LCOV - code coverage report
Current view: top level - optimize/_trlib/_trlib.cpython-312-x86_64-linux-gnu.so.p - _trlib.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 2861 9979 28.7 %
Date: 2024-12-03 10:07:04 Functions: 100 322 31.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by Cython 3.0.11 */
       2             : 
       3             : #ifndef PY_SSIZE_T_CLEAN
       4             : #define PY_SSIZE_T_CLEAN
       5             : #endif /* PY_SSIZE_T_CLEAN */
       6             : #if defined(CYTHON_LIMITED_API) && 0
       7             :   #ifndef Py_LIMITED_API
       8             :     #if CYTHON_LIMITED_API+0 > 0x03030000
       9             :       #define Py_LIMITED_API CYTHON_LIMITED_API
      10             :     #else
      11             :       #define Py_LIMITED_API 0x03030000
      12             :     #endif
      13             :   #endif
      14             : #endif
      15             : 
      16             : #include "Python.h"
      17             : #ifndef Py_PYTHON_H
      18             :     #error Python headers needed to compile C extensions, please install development version of Python.
      19             : #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
      20             :     #error Cython requires Python 2.7+ or Python 3.3+.
      21             : #else
      22             : #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
      23             : #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
      24             : #else
      25             : #define __PYX_EXTRA_ABI_MODULE_NAME ""
      26             : #endif
      27             : #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
      28             : #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
      29             : #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
      30             : #define CYTHON_HEX_VERSION 0x03000BF0
      31             : #define CYTHON_FUTURE_DIVISION 1
      32             : #include <stddef.h>
      33             : #ifndef offsetof
      34             :   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
      35             : #endif
      36             : #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
      37             :   #ifndef __stdcall
      38             :     #define __stdcall
      39             :   #endif
      40             :   #ifndef __cdecl
      41             :     #define __cdecl
      42             :   #endif
      43             :   #ifndef __fastcall
      44             :     #define __fastcall
      45             :   #endif
      46             : #endif
      47             : #ifndef DL_IMPORT
      48             :   #define DL_IMPORT(t) t
      49             : #endif
      50             : #ifndef DL_EXPORT
      51             :   #define DL_EXPORT(t) t
      52             : #endif
      53             : #define __PYX_COMMA ,
      54             : #ifndef HAVE_LONG_LONG
      55             :   #define HAVE_LONG_LONG
      56             : #endif
      57             : #ifndef PY_LONG_LONG
      58             :   #define PY_LONG_LONG LONG_LONG
      59             : #endif
      60             : #ifndef Py_HUGE_VAL
      61             :   #define Py_HUGE_VAL HUGE_VAL
      62             : #endif
      63             : #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
      64             : #if defined(GRAALVM_PYTHON)
      65             :   /* For very preliminary testing purposes. Most variables are set the same as PyPy.
      66             :      The existence of this section does not imply that anything works or is even tested */
      67             :   #define CYTHON_COMPILING_IN_PYPY 0
      68             :   #define CYTHON_COMPILING_IN_CPYTHON 0
      69             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
      70             :   #define CYTHON_COMPILING_IN_GRAAL 1
      71             :   #define CYTHON_COMPILING_IN_NOGIL 0
      72             :   #undef CYTHON_USE_TYPE_SLOTS
      73             :   #define CYTHON_USE_TYPE_SLOTS 0
      74             :   #undef CYTHON_USE_TYPE_SPECS
      75             :   #define CYTHON_USE_TYPE_SPECS 0
      76             :   #undef CYTHON_USE_PYTYPE_LOOKUP
      77             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
      78             :   #if PY_VERSION_HEX < 0x03050000
      79             :     #undef CYTHON_USE_ASYNC_SLOTS
      80             :     #define CYTHON_USE_ASYNC_SLOTS 0
      81             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
      82             :     #define CYTHON_USE_ASYNC_SLOTS 1
      83             :   #endif
      84             :   #undef CYTHON_USE_PYLIST_INTERNALS
      85             :   #define CYTHON_USE_PYLIST_INTERNALS 0
      86             :   #undef CYTHON_USE_UNICODE_INTERNALS
      87             :   #define CYTHON_USE_UNICODE_INTERNALS 0
      88             :   #undef CYTHON_USE_UNICODE_WRITER
      89             :   #define CYTHON_USE_UNICODE_WRITER 0
      90             :   #undef CYTHON_USE_PYLONG_INTERNALS
      91             :   #define CYTHON_USE_PYLONG_INTERNALS 0
      92             :   #undef CYTHON_AVOID_BORROWED_REFS
      93             :   #define CYTHON_AVOID_BORROWED_REFS 1
      94             :   #undef CYTHON_ASSUME_SAFE_MACROS
      95             :   #define CYTHON_ASSUME_SAFE_MACROS 0
      96             :   #undef CYTHON_UNPACK_METHODS
      97             :   #define CYTHON_UNPACK_METHODS 0
      98             :   #undef CYTHON_FAST_THREAD_STATE
      99             :   #define CYTHON_FAST_THREAD_STATE 0
     100             :   #undef CYTHON_FAST_GIL
     101             :   #define CYTHON_FAST_GIL 0
     102             :   #undef CYTHON_METH_FASTCALL
     103             :   #define CYTHON_METH_FASTCALL 0
     104             :   #undef CYTHON_FAST_PYCALL
     105             :   #define CYTHON_FAST_PYCALL 0
     106             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     107             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     108             :   #endif
     109             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     110             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     111             :   #undef CYTHON_USE_MODULE_STATE
     112             :   #define CYTHON_USE_MODULE_STATE 0
     113             :   #undef CYTHON_USE_TP_FINALIZE
     114             :   #define CYTHON_USE_TP_FINALIZE 0
     115             :   #undef CYTHON_USE_DICT_VERSIONS
     116             :   #define CYTHON_USE_DICT_VERSIONS 0
     117             :   #undef CYTHON_USE_EXC_INFO_STACK
     118             :   #define CYTHON_USE_EXC_INFO_STACK 0
     119             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     120             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     121             :   #endif
     122             :   #undef CYTHON_USE_FREELISTS
     123             :   #define CYTHON_USE_FREELISTS 0
     124             : #elif defined(PYPY_VERSION)
     125             :   #define CYTHON_COMPILING_IN_PYPY 1
     126             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     127             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     128             :   #define CYTHON_COMPILING_IN_GRAAL 0
     129             :   #define CYTHON_COMPILING_IN_NOGIL 0
     130             :   #undef CYTHON_USE_TYPE_SLOTS
     131             :   #define CYTHON_USE_TYPE_SLOTS 0
     132             :   #ifndef CYTHON_USE_TYPE_SPECS
     133             :     #define CYTHON_USE_TYPE_SPECS 0
     134             :   #endif
     135             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     136             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     137             :   #if PY_VERSION_HEX < 0x03050000
     138             :     #undef CYTHON_USE_ASYNC_SLOTS
     139             :     #define CYTHON_USE_ASYNC_SLOTS 0
     140             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     141             :     #define CYTHON_USE_ASYNC_SLOTS 1
     142             :   #endif
     143             :   #undef CYTHON_USE_PYLIST_INTERNALS
     144             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     145             :   #undef CYTHON_USE_UNICODE_INTERNALS
     146             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     147             :   #undef CYTHON_USE_UNICODE_WRITER
     148             :   #define CYTHON_USE_UNICODE_WRITER 0
     149             :   #undef CYTHON_USE_PYLONG_INTERNALS
     150             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     151             :   #undef CYTHON_AVOID_BORROWED_REFS
     152             :   #define CYTHON_AVOID_BORROWED_REFS 1
     153             :   #undef CYTHON_ASSUME_SAFE_MACROS
     154             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     155             :   #undef CYTHON_UNPACK_METHODS
     156             :   #define CYTHON_UNPACK_METHODS 0
     157             :   #undef CYTHON_FAST_THREAD_STATE
     158             :   #define CYTHON_FAST_THREAD_STATE 0
     159             :   #undef CYTHON_FAST_GIL
     160             :   #define CYTHON_FAST_GIL 0
     161             :   #undef CYTHON_METH_FASTCALL
     162             :   #define CYTHON_METH_FASTCALL 0
     163             :   #undef CYTHON_FAST_PYCALL
     164             :   #define CYTHON_FAST_PYCALL 0
     165             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     166             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     167             :   #endif
     168             :   #if PY_VERSION_HEX < 0x03090000
     169             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     170             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     171             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     172             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     173             :   #endif
     174             :   #undef CYTHON_USE_MODULE_STATE
     175             :   #define CYTHON_USE_MODULE_STATE 0
     176             :   #undef CYTHON_USE_TP_FINALIZE
     177             :   #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
     178             :   #undef CYTHON_USE_DICT_VERSIONS
     179             :   #define CYTHON_USE_DICT_VERSIONS 0
     180             :   #undef CYTHON_USE_EXC_INFO_STACK
     181             :   #define CYTHON_USE_EXC_INFO_STACK 0
     182             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     183             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     184             :   #endif
     185             :   #undef CYTHON_USE_FREELISTS
     186             :   #define CYTHON_USE_FREELISTS 0
     187             : #elif defined(CYTHON_LIMITED_API)
     188             :   #ifdef Py_LIMITED_API
     189             :     #undef __PYX_LIMITED_VERSION_HEX
     190             :     #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
     191             :   #endif
     192             :   #define CYTHON_COMPILING_IN_PYPY 0
     193             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     194             :   #define CYTHON_COMPILING_IN_LIMITED_API 1
     195             :   #define CYTHON_COMPILING_IN_GRAAL 0
     196             :   #define CYTHON_COMPILING_IN_NOGIL 0
     197             :   #undef CYTHON_CLINE_IN_TRACEBACK
     198             :   #define CYTHON_CLINE_IN_TRACEBACK 0
     199             :   #undef CYTHON_USE_TYPE_SLOTS
     200             :   #define CYTHON_USE_TYPE_SLOTS 0
     201             :   #undef CYTHON_USE_TYPE_SPECS
     202             :   #define CYTHON_USE_TYPE_SPECS 1
     203             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     204             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     205             :   #undef CYTHON_USE_ASYNC_SLOTS
     206             :   #define CYTHON_USE_ASYNC_SLOTS 0
     207             :   #undef CYTHON_USE_PYLIST_INTERNALS
     208             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     209             :   #undef CYTHON_USE_UNICODE_INTERNALS
     210             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     211             :   #ifndef CYTHON_USE_UNICODE_WRITER
     212             :     #define CYTHON_USE_UNICODE_WRITER 0
     213             :   #endif
     214             :   #undef CYTHON_USE_PYLONG_INTERNALS
     215             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     216             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     217             :     #define CYTHON_AVOID_BORROWED_REFS 0
     218             :   #endif
     219             :   #undef CYTHON_ASSUME_SAFE_MACROS
     220             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     221             :   #undef CYTHON_UNPACK_METHODS
     222             :   #define CYTHON_UNPACK_METHODS 0
     223             :   #undef CYTHON_FAST_THREAD_STATE
     224             :   #define CYTHON_FAST_THREAD_STATE 0
     225             :   #undef CYTHON_FAST_GIL
     226             :   #define CYTHON_FAST_GIL 0
     227             :   #undef CYTHON_METH_FASTCALL
     228             :   #define CYTHON_METH_FASTCALL 0
     229             :   #undef CYTHON_FAST_PYCALL
     230             :   #define CYTHON_FAST_PYCALL 0
     231             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     232             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     233             :   #endif
     234             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     235             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     236             :   #undef CYTHON_USE_MODULE_STATE
     237             :   #define CYTHON_USE_MODULE_STATE 1
     238             :   #ifndef CYTHON_USE_TP_FINALIZE
     239             :     #define CYTHON_USE_TP_FINALIZE 0
     240             :   #endif
     241             :   #undef CYTHON_USE_DICT_VERSIONS
     242             :   #define CYTHON_USE_DICT_VERSIONS 0
     243             :   #undef CYTHON_USE_EXC_INFO_STACK
     244             :   #define CYTHON_USE_EXC_INFO_STACK 0
     245             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     246             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     247             :   #endif
     248             :   #undef CYTHON_USE_FREELISTS
     249             :   #define CYTHON_USE_FREELISTS 0
     250             : #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
     251             :   #define CYTHON_COMPILING_IN_PYPY 0
     252             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     253             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     254             :   #define CYTHON_COMPILING_IN_GRAAL 0
     255             :   #define CYTHON_COMPILING_IN_NOGIL 1
     256             :   #ifndef CYTHON_USE_TYPE_SLOTS
     257             :     #define CYTHON_USE_TYPE_SLOTS 1
     258             :   #endif
     259             :   #ifndef CYTHON_USE_TYPE_SPECS
     260             :     #define CYTHON_USE_TYPE_SPECS 0
     261             :   #endif
     262             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     263             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     264             :   #ifndef CYTHON_USE_ASYNC_SLOTS
     265             :     #define CYTHON_USE_ASYNC_SLOTS 1
     266             :   #endif
     267             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     268             :     #define CYTHON_USE_PYLONG_INTERNALS 0
     269             :   #endif
     270             :   #undef CYTHON_USE_PYLIST_INTERNALS
     271             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     272             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     273             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     274             :   #endif
     275             :   #undef CYTHON_USE_UNICODE_WRITER
     276             :   #define CYTHON_USE_UNICODE_WRITER 0
     277             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     278             :     #define CYTHON_AVOID_BORROWED_REFS 0
     279             :   #endif
     280             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     281             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     282             :   #endif
     283             :   #ifndef CYTHON_UNPACK_METHODS
     284             :     #define CYTHON_UNPACK_METHODS 1
     285             :   #endif
     286             :   #undef CYTHON_FAST_THREAD_STATE
     287             :   #define CYTHON_FAST_THREAD_STATE 0
     288             :   #undef CYTHON_FAST_GIL
     289             :   #define CYTHON_FAST_GIL 0
     290             :   #ifndef CYTHON_METH_FASTCALL
     291             :     #define CYTHON_METH_FASTCALL 1
     292             :   #endif
     293             :   #undef CYTHON_FAST_PYCALL
     294             :   #define CYTHON_FAST_PYCALL 0
     295             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     296             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     297             :   #endif
     298             :   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
     299             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     300             :   #endif
     301             :   #ifndef CYTHON_USE_MODULE_STATE
     302             :     #define CYTHON_USE_MODULE_STATE 0
     303             :   #endif
     304             :   #ifndef CYTHON_USE_TP_FINALIZE
     305             :     #define CYTHON_USE_TP_FINALIZE 1
     306             :   #endif
     307             :   #undef CYTHON_USE_DICT_VERSIONS
     308             :   #define CYTHON_USE_DICT_VERSIONS 0
     309             :   #undef CYTHON_USE_EXC_INFO_STACK
     310             :   #define CYTHON_USE_EXC_INFO_STACK 0
     311             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     312             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     313             :   #endif
     314             :   #ifndef CYTHON_USE_FREELISTS
     315             :     #define CYTHON_USE_FREELISTS 0
     316             :   #endif
     317             : #else
     318             :   #define CYTHON_COMPILING_IN_PYPY 0
     319             :   #define CYTHON_COMPILING_IN_CPYTHON 1
     320             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     321             :   #define CYTHON_COMPILING_IN_GRAAL 0
     322             :   #define CYTHON_COMPILING_IN_NOGIL 0
     323             :   #ifndef CYTHON_USE_TYPE_SLOTS
     324             :     #define CYTHON_USE_TYPE_SLOTS 1
     325             :   #endif
     326             :   #ifndef CYTHON_USE_TYPE_SPECS
     327             :     #define CYTHON_USE_TYPE_SPECS 0
     328             :   #endif
     329             :   #ifndef CYTHON_USE_PYTYPE_LOOKUP
     330             :     #define CYTHON_USE_PYTYPE_LOOKUP 1
     331             :   #endif
     332             :   #if PY_MAJOR_VERSION < 3
     333             :     #undef CYTHON_USE_ASYNC_SLOTS
     334             :     #define CYTHON_USE_ASYNC_SLOTS 0
     335             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     336             :     #define CYTHON_USE_ASYNC_SLOTS 1
     337             :   #endif
     338             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     339             :     #define CYTHON_USE_PYLONG_INTERNALS 1
     340             :   #endif
     341             :   #ifndef CYTHON_USE_PYLIST_INTERNALS
     342             :     #define CYTHON_USE_PYLIST_INTERNALS 1
     343             :   #endif
     344             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     345             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     346             :   #endif
     347             :   #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
     348             :     #undef CYTHON_USE_UNICODE_WRITER
     349             :     #define CYTHON_USE_UNICODE_WRITER 0
     350             :   #elif !defined(CYTHON_USE_UNICODE_WRITER)
     351             :     #define CYTHON_USE_UNICODE_WRITER 1
     352             :   #endif
     353             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     354             :     #define CYTHON_AVOID_BORROWED_REFS 0
     355             :   #endif
     356             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     357             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     358             :   #endif
     359             :   #ifndef CYTHON_UNPACK_METHODS
     360             :     #define CYTHON_UNPACK_METHODS 1
     361             :   #endif
     362             :   #ifndef CYTHON_FAST_THREAD_STATE
     363             :     #define CYTHON_FAST_THREAD_STATE 1
     364             :   #endif
     365             :   #ifndef CYTHON_FAST_GIL
     366             :     #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
     367             :   #endif
     368             :   #ifndef CYTHON_METH_FASTCALL
     369             :     #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
     370             :   #endif
     371             :   #ifndef CYTHON_FAST_PYCALL
     372             :     #define CYTHON_FAST_PYCALL 1
     373             :   #endif
     374             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     375             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     376             :   #endif
     377             :   #if PY_VERSION_HEX < 0x03050000
     378             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     379             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     380             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     381             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     382             :   #endif
     383             :   #ifndef CYTHON_USE_MODULE_STATE
     384             :     #define CYTHON_USE_MODULE_STATE 0
     385             :   #endif
     386             :   #if PY_VERSION_HEX < 0x030400a1
     387             :     #undef CYTHON_USE_TP_FINALIZE
     388             :     #define CYTHON_USE_TP_FINALIZE 0
     389             :   #elif !defined(CYTHON_USE_TP_FINALIZE)
     390             :     #define CYTHON_USE_TP_FINALIZE 1
     391             :   #endif
     392             :   #if PY_VERSION_HEX < 0x030600B1
     393             :     #undef CYTHON_USE_DICT_VERSIONS
     394             :     #define CYTHON_USE_DICT_VERSIONS 0
     395             :   #elif !defined(CYTHON_USE_DICT_VERSIONS)
     396             :     #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
     397             :   #endif
     398             :   #if PY_VERSION_HEX < 0x030700A3
     399             :     #undef CYTHON_USE_EXC_INFO_STACK
     400             :     #define CYTHON_USE_EXC_INFO_STACK 0
     401             :   #elif !defined(CYTHON_USE_EXC_INFO_STACK)
     402             :     #define CYTHON_USE_EXC_INFO_STACK 1
     403             :   #endif
     404             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     405             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     406             :   #endif
     407             :   #ifndef CYTHON_USE_FREELISTS
     408             :     #define CYTHON_USE_FREELISTS 1
     409             :   #endif
     410             : #endif
     411             : #if !defined(CYTHON_FAST_PYCCALL)
     412             : #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
     413             : #endif
     414             : #if !defined(CYTHON_VECTORCALL)
     415             : #define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
     416             : #endif
     417             : #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
     418             : #if CYTHON_USE_PYLONG_INTERNALS
     419             :   #if PY_MAJOR_VERSION < 3
     420             :     #include "longintrepr.h"
     421             :   #endif
     422             :   #undef SHIFT
     423             :   #undef BASE
     424             :   #undef MASK
     425             :   #ifdef SIZEOF_VOID_P
     426             :     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
     427             :   #endif
     428             : #endif
     429             : #ifndef __has_attribute
     430             :   #define __has_attribute(x) 0
     431             : #endif
     432             : #ifndef __has_cpp_attribute
     433             :   #define __has_cpp_attribute(x) 0
     434             : #endif
     435             : #ifndef CYTHON_RESTRICT
     436             :   #if defined(__GNUC__)
     437             :     #define CYTHON_RESTRICT __restrict__
     438             :   #elif defined(_MSC_VER) && _MSC_VER >= 1400
     439             :     #define CYTHON_RESTRICT __restrict
     440             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     441             :     #define CYTHON_RESTRICT restrict
     442             :   #else
     443             :     #define CYTHON_RESTRICT
     444             :   #endif
     445             : #endif
     446             : #ifndef CYTHON_UNUSED
     447             :   #if defined(__cplusplus)
     448             :     /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     449             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     450             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     451             :       #if __has_cpp_attribute(maybe_unused)
     452             :         #define CYTHON_UNUSED [[maybe_unused]]
     453             :       #endif
     454             :     #endif
     455             :   #endif
     456             : #endif
     457             : #ifndef CYTHON_UNUSED
     458             : # if defined(__GNUC__)
     459             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
     460             : #     define CYTHON_UNUSED __attribute__ ((__unused__))
     461             : #   else
     462             : #     define CYTHON_UNUSED
     463             : #   endif
     464             : # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
     465             : #   define CYTHON_UNUSED __attribute__ ((__unused__))
     466             : # else
     467             : #   define CYTHON_UNUSED
     468             : # endif
     469             : #endif
     470             : #ifndef CYTHON_UNUSED_VAR
     471             : #  if defined(__cplusplus)
     472             :      template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
     473             : #  else
     474             : #    define CYTHON_UNUSED_VAR(x) (void)(x)
     475             : #  endif
     476             : #endif
     477             : #ifndef CYTHON_MAYBE_UNUSED_VAR
     478             :   #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
     479             : #endif
     480             : #ifndef CYTHON_NCP_UNUSED
     481             : # if CYTHON_COMPILING_IN_CPYTHON
     482             : #  define CYTHON_NCP_UNUSED
     483             : # else
     484             : #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
     485             : # endif
     486             : #endif
     487             : #ifndef CYTHON_USE_CPP_STD_MOVE
     488             :   #if defined(__cplusplus) && (\
     489             :     __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
     490             :     #define CYTHON_USE_CPP_STD_MOVE 1
     491             :   #else
     492             :     #define CYTHON_USE_CPP_STD_MOVE 0
     493             :   #endif
     494             : #endif
     495             : #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
     496             : #ifdef _MSC_VER
     497             :     #ifndef _MSC_STDINT_H_
     498             :         #if _MSC_VER < 1300
     499             :             typedef unsigned char     uint8_t;
     500             :             typedef unsigned short    uint16_t;
     501             :             typedef unsigned int      uint32_t;
     502             :         #else
     503             :             typedef unsigned __int8   uint8_t;
     504             :             typedef unsigned __int16  uint16_t;
     505             :             typedef unsigned __int32  uint32_t;
     506             :         #endif
     507             :     #endif
     508             :     #if _MSC_VER < 1300
     509             :         #ifdef _WIN64
     510             :             typedef unsigned long long  __pyx_uintptr_t;
     511             :         #else
     512             :             typedef unsigned int        __pyx_uintptr_t;
     513             :         #endif
     514             :     #else
     515             :         #ifdef _WIN64
     516             :             typedef unsigned __int64    __pyx_uintptr_t;
     517             :         #else
     518             :             typedef unsigned __int32    __pyx_uintptr_t;
     519             :         #endif
     520             :     #endif
     521             : #else
     522             :     #include <stdint.h>
     523             :     typedef uintptr_t  __pyx_uintptr_t;
     524             : #endif
     525             : #ifndef CYTHON_FALLTHROUGH
     526             :   #if defined(__cplusplus)
     527             :     /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     528             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     529             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     530             :       #if __has_cpp_attribute(fallthrough)
     531             :         #define CYTHON_FALLTHROUGH [[fallthrough]]
     532             :       #endif
     533             :     #endif
     534             :     #ifndef CYTHON_FALLTHROUGH
     535             :       #if __has_cpp_attribute(clang::fallthrough)
     536             :         #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
     537             :       #elif __has_cpp_attribute(gnu::fallthrough)
     538             :         #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
     539             :       #endif
     540             :     #endif
     541             :   #endif
     542             :   #ifndef CYTHON_FALLTHROUGH
     543             :     #if __has_attribute(fallthrough)
     544             :       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
     545             :     #else
     546             :       #define CYTHON_FALLTHROUGH
     547             :     #endif
     548             :   #endif
     549             :   #if defined(__clang__) && defined(__apple_build_version__)
     550             :     #if __apple_build_version__ < 7000000
     551             :       #undef  CYTHON_FALLTHROUGH
     552             :       #define CYTHON_FALLTHROUGH
     553             :     #endif
     554             :   #endif
     555             : #endif
     556             : #ifdef __cplusplus
     557             :   template <typename T>
     558             :   struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
     559             :   #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
     560             : #else
     561             :   #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
     562             : #endif
     563             : #if CYTHON_COMPILING_IN_PYPY == 1
     564             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
     565             : #else
     566             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
     567             : #endif
     568             : #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
     569             : 
     570             : #ifndef CYTHON_INLINE
     571             :   #if defined(__clang__)
     572             :     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
     573             :   #elif defined(__GNUC__)
     574             :     #define CYTHON_INLINE __inline__
     575             :   #elif defined(_MSC_VER)
     576             :     #define CYTHON_INLINE __inline
     577             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     578             :     #define CYTHON_INLINE inline
     579             :   #else
     580             :     #define CYTHON_INLINE
     581             :   #endif
     582             : #endif
     583             : 
     584             : #define __PYX_BUILD_PY_SSIZE_T "n"
     585             : #define CYTHON_FORMAT_SSIZE_T "z"
     586             : #if PY_MAJOR_VERSION < 3
     587             :   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
     588             :   #define __Pyx_DefaultClassType PyClass_Type
     589             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     590             :           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     591             : #else
     592             :   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
     593             :   #define __Pyx_DefaultClassType PyType_Type
     594             : #if CYTHON_COMPILING_IN_LIMITED_API
     595             :     static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     596             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     597             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     598             :                                                     PyObject *name, int fline, PyObject *lnos) {
     599             :         PyObject *exception_table = NULL;
     600             :         PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
     601             :         #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
     602             :         PyObject *version_info;
     603             :         PyObject *py_minor_version = NULL;
     604             :         #endif
     605             :         long minor_version = 0;
     606             :         PyObject *type, *value, *traceback;
     607             :         PyErr_Fetch(&type, &value, &traceback);
     608             :         #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
     609             :         minor_version = 11;
     610             :         #else
     611             :         if (!(version_info = PySys_GetObject("version_info"))) goto end;
     612             :         if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
     613             :         minor_version = PyLong_AsLong(py_minor_version);
     614             :         Py_DECREF(py_minor_version);
     615             :         if (minor_version == -1 && PyErr_Occurred()) goto end;
     616             :         #endif
     617             :         if (!(types_module = PyImport_ImportModule("types"))) goto end;
     618             :         if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
     619             :         if (minor_version <= 7) {
     620             :             (void)p;
     621             :             result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
     622             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     623             :         } else if (minor_version <= 10) {
     624             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
     625             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     626             :         } else {
     627             :             if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
     628             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
     629             :                           c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
     630             :         }
     631             :     end:
     632             :         Py_XDECREF(code_type);
     633             :         Py_XDECREF(exception_table);
     634             :         Py_XDECREF(types_module);
     635             :         if (type) {
     636             :             PyErr_Restore(type, value, traceback);
     637             :         }
     638             :         return result;
     639             :     }
     640             :     #ifndef CO_OPTIMIZED
     641             :     #define CO_OPTIMIZED 0x0001
     642             :     #endif
     643             :     #ifndef CO_NEWLOCALS
     644             :     #define CO_NEWLOCALS 0x0002
     645             :     #endif
     646             :     #ifndef CO_VARARGS
     647             :     #define CO_VARARGS 0x0004
     648             :     #endif
     649             :     #ifndef CO_VARKEYWORDS
     650             :     #define CO_VARKEYWORDS 0x0008
     651             :     #endif
     652             :     #ifndef CO_ASYNC_GENERATOR
     653             :     #define CO_ASYNC_GENERATOR 0x0200
     654             :     #endif
     655             :     #ifndef CO_GENERATOR
     656             :     #define CO_GENERATOR 0x0020
     657             :     #endif
     658             :     #ifndef CO_COROUTINE
     659             :     #define CO_COROUTINE 0x0080
     660             :     #endif
     661             : #elif PY_VERSION_HEX >= 0x030B0000
     662           9 :   static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     663             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     664             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     665             :                                                     PyObject *name, int fline, PyObject *lnos) {
     666           9 :     PyCodeObject *result;
     667           9 :     PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
     668           9 :     if (!empty_bytes) return NULL;
     669           9 :     result =
     670             :       #if PY_VERSION_HEX >= 0x030C0000
     671           9 :         PyUnstable_Code_NewWithPosOnlyArgs
     672             :       #else
     673             :         PyCode_NewWithPosOnlyArgs
     674             :       #endif
     675             :         (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
     676           9 :     Py_DECREF(empty_bytes);
     677             :     return result;
     678             :   }
     679             : #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
     680             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     681             :           PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     682             : #else
     683             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     684             :           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     685             : #endif
     686             : #endif
     687             : #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
     688             :   #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
     689             : #else
     690             :   #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
     691             : #endif
     692             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
     693             :   #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
     694             : #else
     695             :   #define __Pyx_Py_Is(x, y) ((x) == (y))
     696             : #endif
     697             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
     698             :   #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
     699             : #else
     700             :   #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
     701             : #endif
     702             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
     703             :   #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
     704             : #else
     705             :   #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
     706             : #endif
     707             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
     708             :   #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
     709             : #else
     710             :   #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
     711             : #endif
     712             : #define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
     713             : #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
     714             :   #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
     715             : #else
     716             :   #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
     717             : #endif
     718             : #ifndef CO_COROUTINE
     719             :   #define CO_COROUTINE 0x80
     720             : #endif
     721             : #ifndef CO_ASYNC_GENERATOR
     722             :   #define CO_ASYNC_GENERATOR 0x200
     723             : #endif
     724             : #ifndef Py_TPFLAGS_CHECKTYPES
     725             :   #define Py_TPFLAGS_CHECKTYPES 0
     726             : #endif
     727             : #ifndef Py_TPFLAGS_HAVE_INDEX
     728             :   #define Py_TPFLAGS_HAVE_INDEX 0
     729             : #endif
     730             : #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
     731             :   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
     732             : #endif
     733             : #ifndef Py_TPFLAGS_HAVE_FINALIZE
     734             :   #define Py_TPFLAGS_HAVE_FINALIZE 0
     735             : #endif
     736             : #ifndef Py_TPFLAGS_SEQUENCE
     737             :   #define Py_TPFLAGS_SEQUENCE 0
     738             : #endif
     739             : #ifndef Py_TPFLAGS_MAPPING
     740             :   #define Py_TPFLAGS_MAPPING 0
     741             : #endif
     742             : #ifndef METH_STACKLESS
     743             :   #define METH_STACKLESS 0
     744             : #endif
     745             : #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
     746             :   #ifndef METH_FASTCALL
     747             :      #define METH_FASTCALL 0x80
     748             :   #endif
     749             :   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
     750             :   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
     751             :                                                           Py_ssize_t nargs, PyObject *kwnames);
     752             : #else
     753             :   #if PY_VERSION_HEX >= 0x030d00A4
     754             :   #  define __Pyx_PyCFunctionFast PyCFunctionFast
     755             :   #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
     756             :   #else
     757             :   #  define __Pyx_PyCFunctionFast _PyCFunctionFast
     758             :   #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
     759             :   #endif
     760             : #endif
     761             : #if CYTHON_METH_FASTCALL
     762             :   #define __Pyx_METH_FASTCALL METH_FASTCALL
     763             :   #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
     764             :   #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
     765             : #else
     766             :   #define __Pyx_METH_FASTCALL METH_VARARGS
     767             :   #define __Pyx_PyCFunction_FastCall PyCFunction
     768             :   #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
     769             : #endif
     770             : #if CYTHON_VECTORCALL
     771             :   #define __pyx_vectorcallfunc vectorcallfunc
     772             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
     773             :   #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
     774             : #elif CYTHON_BACKPORT_VECTORCALL
     775             :   typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
     776             :                                             size_t nargsf, PyObject *kwnames);
     777             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
     778             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
     779             : #else
     780             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
     781             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
     782             : #endif
     783             : #if PY_MAJOR_VERSION >= 0x030900B1
     784             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
     785             : #else
     786             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
     787             : #endif
     788             : #define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
     789             : #if CYTHON_COMPILING_IN_CPYTHON
     790             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
     791             : #elif !CYTHON_COMPILING_IN_LIMITED_API
     792             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
     793             : #endif
     794             : #if CYTHON_COMPILING_IN_CPYTHON
     795             : #define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
     796           0 : static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
     797           0 :     return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
     798             : }
     799             : #endif
     800             : static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
     801             : #if CYTHON_COMPILING_IN_LIMITED_API
     802             :     return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
     803             : #else
     804             :     return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
     805             : #endif
     806             : }
     807             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
     808             : #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
     809             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
     810             :   typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
     811             : #else
     812             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
     813             :   #define __Pyx_PyCMethod  PyCMethod
     814             : #endif
     815             : #ifndef METH_METHOD
     816             :   #define METH_METHOD 0x200
     817             : #endif
     818             : #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
     819             :   #define PyObject_Malloc(s)   PyMem_Malloc(s)
     820             :   #define PyObject_Free(p)     PyMem_Free(p)
     821             :   #define PyObject_Realloc(p)  PyMem_Realloc(p)
     822             : #endif
     823             : #if CYTHON_COMPILING_IN_LIMITED_API
     824             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     825             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
     826             : #else
     827             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     828             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
     829             : #endif
     830             : #if CYTHON_COMPILING_IN_LIMITED_API
     831             :   #define __Pyx_PyThreadState_Current PyThreadState_Get()
     832             : #elif !CYTHON_FAST_THREAD_STATE
     833             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     834             : #elif PY_VERSION_HEX >= 0x030d00A1
     835             :   #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
     836             : #elif PY_VERSION_HEX >= 0x03060000
     837             :   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
     838             : #elif PY_VERSION_HEX >= 0x03000000
     839             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     840             : #else
     841             :   #define __Pyx_PyThreadState_Current _PyThreadState_Current
     842             : #endif
     843             : #if CYTHON_COMPILING_IN_LIMITED_API
     844             : static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
     845             : {
     846             :     void *result;
     847             :     result = PyModule_GetState(op);
     848             :     if (!result)
     849             :         Py_FatalError("Couldn't find the module state");
     850             :     return result;
     851             : }
     852             : #endif
     853             : #define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
     854             : #if CYTHON_COMPILING_IN_LIMITED_API
     855             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
     856             : #else
     857             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
     858             : #endif
     859             : #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
     860             : #include "pythread.h"
     861             : #define Py_tss_NEEDS_INIT 0
     862             : typedef int Py_tss_t;
     863             : static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
     864             :   *key = PyThread_create_key();
     865             :   return 0;
     866             : }
     867             : static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
     868             :   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
     869             :   *key = Py_tss_NEEDS_INIT;
     870             :   return key;
     871             : }
     872             : static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
     873             :   PyObject_Free(key);
     874             : }
     875             : static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
     876             :   return *key != Py_tss_NEEDS_INIT;
     877             : }
     878             : static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
     879             :   PyThread_delete_key(*key);
     880             :   *key = Py_tss_NEEDS_INIT;
     881             : }
     882             : static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
     883             :   return PyThread_set_key_value(*key, value);
     884             : }
     885             : static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
     886             :   return PyThread_get_key_value(*key);
     887             : }
     888             : #endif
     889             : #if PY_MAJOR_VERSION < 3
     890             :     #if CYTHON_COMPILING_IN_PYPY
     891             :         #if PYPY_VERSION_NUM < 0x07030600
     892             :             #if defined(__cplusplus) && __cplusplus >= 201402L
     893             :                 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
     894             :             #elif defined(__GNUC__) || defined(__clang__)
     895             :                 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
     896             :             #elif defined(_MSC_VER)
     897             :                 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
     898             :             #endif
     899             :             static CYTHON_INLINE int PyGILState_Check(void) {
     900             :                 return 0;
     901             :             }
     902             :         #else  // PYPY_VERSION_NUM < 0x07030600
     903             :         #endif  // PYPY_VERSION_NUM < 0x07030600
     904             :     #else
     905             :         static CYTHON_INLINE int PyGILState_Check(void) {
     906             :             PyThreadState * tstate = _PyThreadState_Current;
     907             :             return tstate && (tstate == PyGILState_GetThisThreadState());
     908             :         }
     909             :     #endif
     910             : #endif
     911             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
     912             : #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
     913             : #else
     914             : #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
     915             : #endif
     916             : #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
     917             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
     918             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
     919             : #else
     920             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
     921             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
     922             : #endif
     923             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
     924             : #define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
     925           0 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
     926           0 :     PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
     927           0 :     if (res == NULL) PyErr_Clear();
     928           0 :     return res;
     929             : }
     930             : #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
     931             : #define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
     932             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     933             : #else
     934             : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
     935             : #if CYTHON_COMPILING_IN_PYPY
     936             :     return PyDict_GetItem(dict, name);
     937             : #else
     938             :     PyDictEntry *ep;
     939             :     PyDictObject *mp = (PyDictObject*) dict;
     940             :     long hash = ((PyStringObject *) name)->ob_shash;
     941             :     assert(hash != -1);
     942             :     ep = (mp->ma_lookup)(mp, name, hash);
     943             :     if (ep == NULL) {
     944             :         return NULL;
     945             :     }
     946             :     return ep->me_value;
     947             : #endif
     948             : }
     949             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     950             : #endif
     951             : #if CYTHON_USE_TYPE_SLOTS
     952             :   #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
     953             :   #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
     954             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
     955             : #else
     956             :   #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
     957             :   #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
     958             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
     959             : #endif
     960             : #if CYTHON_COMPILING_IN_LIMITED_API
     961             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
     962             : #else
     963             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
     964             : #endif
     965             : #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
     966             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
     967             :     PyTypeObject *type = Py_TYPE((PyObject*)obj);\
     968             :     assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
     969             :     PyObject_GC_Del(obj);\
     970             :     Py_DECREF(type);\
     971             : }
     972             : #else
     973             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
     974             : #endif
     975             : #if CYTHON_COMPILING_IN_LIMITED_API
     976             :   #define CYTHON_PEP393_ENABLED 1
     977             :   #define __Pyx_PyUnicode_READY(op)       (0)
     978             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
     979             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
     980             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
     981             :   #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
     982             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
     983             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
     984             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
     985             : #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
     986             :   #define CYTHON_PEP393_ENABLED 1
     987             :   #if PY_VERSION_HEX >= 0x030C0000
     988             :     #define __Pyx_PyUnicode_READY(op)       (0)
     989             :   #else
     990             :     #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
     991             :                                                 0 : _PyUnicode_Ready((PyObject *)(op)))
     992             :   #endif
     993             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
     994             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
     995             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
     996             :   #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
     997             :   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
     998             :   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
     999             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
    1000             :   #if PY_VERSION_HEX >= 0x030C0000
    1001             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
    1002             :   #else
    1003             :     #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    1004             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    1005             :     #else
    1006             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    1007             :     #endif
    1008             :   #endif
    1009             : #else
    1010             :   #define CYTHON_PEP393_ENABLED 0
    1011             :   #define PyUnicode_1BYTE_KIND  1
    1012             :   #define PyUnicode_2BYTE_KIND  2
    1013             :   #define PyUnicode_4BYTE_KIND  4
    1014             :   #define __Pyx_PyUnicode_READY(op)       (0)
    1015             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
    1016             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
    1017             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
    1018             :   #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
    1019             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
    1020             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
    1021             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
    1022             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
    1023             : #endif
    1024             : #if CYTHON_COMPILING_IN_PYPY
    1025             :   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
    1026             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
    1027             : #else
    1028             :   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
    1029             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    1030             :       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
    1031             : #endif
    1032             : #if CYTHON_COMPILING_IN_PYPY
    1033             :   #if !defined(PyUnicode_DecodeUnicodeEscape)
    1034             :     #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
    1035             :   #endif
    1036             :   #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    1037             :     #undef PyUnicode_Contains
    1038             :     #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
    1039             :   #endif
    1040             :   #if !defined(PyByteArray_Check)
    1041             :     #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
    1042             :   #endif
    1043             :   #if !defined(PyObject_Format)
    1044             :     #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
    1045             :   #endif
    1046             : #endif
    1047             : #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
    1048             : #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
    1049             : #if PY_MAJOR_VERSION >= 3
    1050             :   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
    1051             : #else
    1052             :   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
    1053             : #endif
    1054             : #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
    1055             :   #define PyObject_ASCII(o)            PyObject_Repr(o)
    1056             : #endif
    1057             : #if PY_MAJOR_VERSION >= 3
    1058             :   #define PyBaseString_Type            PyUnicode_Type
    1059             :   #define PyStringObject               PyUnicodeObject
    1060             :   #define PyString_Type                PyUnicode_Type
    1061             :   #define PyString_Check               PyUnicode_Check
    1062             :   #define PyString_CheckExact          PyUnicode_CheckExact
    1063             : #ifndef PyObject_Unicode
    1064             :   #define PyObject_Unicode             PyObject_Str
    1065             : #endif
    1066             : #endif
    1067             : #if PY_MAJOR_VERSION >= 3
    1068             :   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
    1069             :   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
    1070             : #else
    1071             :   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
    1072             :   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
    1073             : #endif
    1074             : #if CYTHON_COMPILING_IN_CPYTHON
    1075             :   #define __Pyx_PySequence_ListKeepNew(obj)\
    1076             :     (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
    1077             : #else
    1078             :   #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
    1079             : #endif
    1080             : #ifndef PySet_CheckExact
    1081             :   #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
    1082             : #endif
    1083             : #if PY_VERSION_HEX >= 0x030900A4
    1084             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
    1085             :   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
    1086             : #else
    1087             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
    1088             :   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
    1089             : #endif
    1090             : #if CYTHON_ASSUME_SAFE_MACROS
    1091             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
    1092             :   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
    1093             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
    1094             :   #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
    1095             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
    1096             :   #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
    1097             :   #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
    1098             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
    1099             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
    1100             : #else
    1101             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
    1102             :   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
    1103             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
    1104             :   #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
    1105             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
    1106             :   #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
    1107             :   #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
    1108             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
    1109             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
    1110             : #endif
    1111             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    1112             :   #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
    1113             : #else
    1114           9 :   static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
    1115           9 :       PyObject *module = PyImport_AddModule(name);
    1116           9 :       Py_XINCREF(module);
    1117           9 :       return module;
    1118             :   }
    1119             : #endif
    1120             : #if PY_MAJOR_VERSION >= 3
    1121             :   #define PyIntObject                  PyLongObject
    1122             :   #define PyInt_Type                   PyLong_Type
    1123             :   #define PyInt_Check(op)              PyLong_Check(op)
    1124             :   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
    1125             :   #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
    1126             :   #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
    1127             :   #define PyInt_FromString             PyLong_FromString
    1128             :   #define PyInt_FromUnicode            PyLong_FromUnicode
    1129             :   #define PyInt_FromLong               PyLong_FromLong
    1130             :   #define PyInt_FromSize_t             PyLong_FromSize_t
    1131             :   #define PyInt_FromSsize_t            PyLong_FromSsize_t
    1132             :   #define PyInt_AsLong                 PyLong_AsLong
    1133             :   #define PyInt_AS_LONG                PyLong_AS_LONG
    1134             :   #define PyInt_AsSsize_t              PyLong_AsSsize_t
    1135             :   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
    1136             :   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
    1137             :   #define PyNumber_Int                 PyNumber_Long
    1138             : #else
    1139             :   #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
    1140             :   #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
    1141             : #endif
    1142             : #if PY_MAJOR_VERSION >= 3
    1143             :   #define PyBoolObject                 PyLongObject
    1144             : #endif
    1145             : #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
    1146             :   #ifndef PyUnicode_InternFromString
    1147             :     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
    1148             :   #endif
    1149             : #endif
    1150             : #if PY_VERSION_HEX < 0x030200A4
    1151             :   typedef long Py_hash_t;
    1152             :   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
    1153             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
    1154             : #else
    1155             :   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
    1156             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
    1157             : #endif
    1158             : #if CYTHON_USE_ASYNC_SLOTS
    1159             :   #if PY_VERSION_HEX >= 0x030500B1
    1160             :     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    1161             :     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
    1162             :   #else
    1163             :     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
    1164             :   #endif
    1165             : #else
    1166             :   #define __Pyx_PyType_AsAsync(obj) NULL
    1167             : #endif
    1168             : #ifndef __Pyx_PyAsyncMethodsStruct
    1169             :     typedef struct {
    1170             :         unaryfunc am_await;
    1171             :         unaryfunc am_aiter;
    1172             :         unaryfunc am_anext;
    1173             :     } __Pyx_PyAsyncMethodsStruct;
    1174             : #endif
    1175             : 
    1176             : #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
    1177             :   #if !defined(_USE_MATH_DEFINES)
    1178             :     #define _USE_MATH_DEFINES
    1179             :   #endif
    1180             : #endif
    1181             : #include <math.h>
    1182             : #ifdef NAN
    1183             : #define __PYX_NAN() ((float) NAN)
    1184             : #else
    1185             : static CYTHON_INLINE float __PYX_NAN() {
    1186             :   float value;
    1187             :   memset(&value, 0xFF, sizeof(value));
    1188             :   return value;
    1189             : }
    1190             : #endif
    1191             : #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
    1192             : #define __Pyx_truncl trunc
    1193             : #else
    1194             : #define __Pyx_truncl truncl
    1195             : #endif
    1196             : 
    1197             : #define __PYX_MARK_ERR_POS(f_index, lineno) \
    1198             :     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
    1199             : #define __PYX_ERR(f_index, lineno, Ln_error) \
    1200             :     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
    1201             : 
    1202             : #ifdef CYTHON_EXTERN_C
    1203             :     #undef __PYX_EXTERN_C
    1204             :     #define __PYX_EXTERN_C CYTHON_EXTERN_C
    1205             : #elif defined(__PYX_EXTERN_C)
    1206             :     #ifdef _MSC_VER
    1207             :     #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    1208             :     #else
    1209             :     #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    1210             :     #endif
    1211             : #else
    1212             :   #ifdef __cplusplus
    1213             :     #define __PYX_EXTERN_C extern "C"
    1214             :   #else
    1215             :     #define __PYX_EXTERN_C extern
    1216             :   #endif
    1217             : #endif
    1218             : 
    1219             : #define __PYX_HAVE__scipy__optimize___trlib___trlib
    1220             : #define __PYX_HAVE_API__scipy__optimize___trlib___trlib
    1221             : /* Early includes */
    1222             : #include <string.h>
    1223             : #include <stdio.h>
    1224             : #include "trlib.h"
    1225             : 
    1226             :     /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    1227             :     
    1228             : #include "numpy/arrayobject.h"
    1229             : #include "numpy/ndarrayobject.h"
    1230             : #include "numpy/ndarraytypes.h"
    1231             : #include "numpy/arrayscalars.h"
    1232             : #include "numpy/ufuncobject.h"
    1233             : #include <stdlib.h>
    1234             : #include "pythread.h"
    1235             : #ifdef _OPENMP
    1236             : #include <omp.h>
    1237             : #endif /* _OPENMP */
    1238             : 
    1239             : #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
    1240             : #define CYTHON_WITHOUT_ASSERTIONS
    1241             : #endif
    1242             : 
    1243             : typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
    1244             :                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
    1245             : 
    1246             : #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
    1247             : #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
    1248             : #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
    1249             : #define __PYX_DEFAULT_STRING_ENCODING ""
    1250             : #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
    1251             : #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1252             : #define __Pyx_uchar_cast(c) ((unsigned char)c)
    1253             : #define __Pyx_long_cast(x) ((long)x)
    1254             : #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    1255             :     (sizeof(type) < sizeof(Py_ssize_t))  ||\
    1256             :     (sizeof(type) > sizeof(Py_ssize_t) &&\
    1257             :           likely(v < (type)PY_SSIZE_T_MAX ||\
    1258             :                  v == (type)PY_SSIZE_T_MAX)  &&\
    1259             :           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
    1260             :                                 v == (type)PY_SSIZE_T_MIN)))  ||\
    1261             :     (sizeof(type) == sizeof(Py_ssize_t) &&\
    1262             :           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
    1263             :                                v == (type)PY_SSIZE_T_MAX)))  )
    1264         624 : static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    1265         624 :     return (size_t) i < (size_t) limit;
    1266             : }
    1267             : #if defined (__cplusplus) && __cplusplus >= 201103L
    1268             :     #include <cstdlib>
    1269             :     #define __Pyx_sst_abs(value) std::abs(value)
    1270             : #elif SIZEOF_INT >= SIZEOF_SIZE_T
    1271             :     #define __Pyx_sst_abs(value) abs(value)
    1272             : #elif SIZEOF_LONG >= SIZEOF_SIZE_T
    1273             :     #define __Pyx_sst_abs(value) labs(value)
    1274             : #elif defined (_MSC_VER)
    1275             :     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
    1276             : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    1277             :     #define __Pyx_sst_abs(value) llabs(value)
    1278             : #elif defined (__GNUC__)
    1279             :     #define __Pyx_sst_abs(value) __builtin_llabs(value)
    1280             : #else
    1281             :     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
    1282             : #endif
    1283             : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
    1284             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
    1285             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
    1286             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
    1287             : #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
    1288             : #define __Pyx_PyBytes_FromString        PyBytes_FromString
    1289             : #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
    1290             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
    1291             : #if PY_MAJOR_VERSION < 3
    1292             :     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    1293             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1294             : #else
    1295             :     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    1296             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
    1297             : #endif
    1298             : #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    1299             : #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    1300             : #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    1301             : #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    1302             : #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    1303             : #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    1304             : #define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1305             : #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1306             : #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1307             : #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
    1308             : #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
    1309             : #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
    1310             : #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
    1311             : #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
    1312             : #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
    1313             : #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
    1314             : #define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
    1315             : #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
    1316             : #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
    1317             : #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
    1318             : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
    1319             : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
    1320             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
    1321             : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
    1322             : #define __Pyx_PySequence_Tuple(obj)\
    1323             :     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
    1324             : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
    1325             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
    1326             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
    1327             : #if CYTHON_ASSUME_SAFE_MACROS
    1328             : #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
    1329             : #else
    1330             : #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
    1331             : #endif
    1332             : #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
    1333             : #if PY_MAJOR_VERSION >= 3
    1334             : #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
    1335             : #else
    1336             : #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
    1337             : #endif
    1338             : #if CYTHON_USE_PYLONG_INTERNALS
    1339             :   #if PY_VERSION_HEX >= 0x030C00A7
    1340             :   #ifndef _PyLong_SIGN_MASK
    1341             :     #define _PyLong_SIGN_MASK 3
    1342             :   #endif
    1343             :   #ifndef _PyLong_NON_SIZE_BITS
    1344             :     #define _PyLong_NON_SIZE_BITS 3
    1345             :   #endif
    1346             :   #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
    1347             :   #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
    1348             :   #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
    1349             :   #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
    1350             :   #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
    1351             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
    1352             :   #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
    1353             :   #define __Pyx_PyLong_SignedDigitCount(x)\
    1354             :         ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
    1355             :   #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    1356             :     #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    1357             :     #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
    1358             :   #else
    1359             :     #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    1360             :     #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
    1361             :   #endif
    1362             :   typedef Py_ssize_t  __Pyx_compact_pylong;
    1363             :   typedef size_t  __Pyx_compact_upylong;
    1364             :   #else
    1365             :   #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
    1366             :   #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
    1367             :   #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
    1368             :   #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
    1369             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
    1370             :   #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
    1371             :   #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
    1372             :   #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
    1373             :   #define __Pyx_PyLong_CompactValue(x)\
    1374             :         ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
    1375             :   typedef sdigit  __Pyx_compact_pylong;
    1376             :   typedef digit  __Pyx_compact_upylong;
    1377             :   #endif
    1378             :   #if PY_VERSION_HEX >= 0x030C00A5
    1379             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
    1380             :   #else
    1381             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
    1382             :   #endif
    1383             : #endif
    1384             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    1385             : #include <string.h>
    1386             : static int __Pyx_sys_getdefaultencoding_not_ascii;
    1387             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1388             :     PyObject* sys;
    1389             :     PyObject* default_encoding = NULL;
    1390             :     PyObject* ascii_chars_u = NULL;
    1391             :     PyObject* ascii_chars_b = NULL;
    1392             :     const char* default_encoding_c;
    1393             :     sys = PyImport_ImportModule("sys");
    1394             :     if (!sys) goto bad;
    1395             :     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    1396             :     Py_DECREF(sys);
    1397             :     if (!default_encoding) goto bad;
    1398             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1399             :     if (!default_encoding_c) goto bad;
    1400             :     if (strcmp(default_encoding_c, "ascii") == 0) {
    1401             :         __Pyx_sys_getdefaultencoding_not_ascii = 0;
    1402             :     } else {
    1403             :         char ascii_chars[128];
    1404             :         int c;
    1405             :         for (c = 0; c < 128; c++) {
    1406             :             ascii_chars[c] = (char) c;
    1407             :         }
    1408             :         __Pyx_sys_getdefaultencoding_not_ascii = 1;
    1409             :         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
    1410             :         if (!ascii_chars_u) goto bad;
    1411             :         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
    1412             :         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
    1413             :             PyErr_Format(
    1414             :                 PyExc_ValueError,
    1415             :                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
    1416             :                 default_encoding_c);
    1417             :             goto bad;
    1418             :         }
    1419             :         Py_DECREF(ascii_chars_u);
    1420             :         Py_DECREF(ascii_chars_b);
    1421             :     }
    1422             :     Py_DECREF(default_encoding);
    1423             :     return 0;
    1424             : bad:
    1425             :     Py_XDECREF(default_encoding);
    1426             :     Py_XDECREF(ascii_chars_u);
    1427             :     Py_XDECREF(ascii_chars_b);
    1428             :     return -1;
    1429             : }
    1430             : #endif
    1431             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
    1432             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
    1433             : #else
    1434             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
    1435             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    1436             : #include <string.h>
    1437             : static char* __PYX_DEFAULT_STRING_ENCODING;
    1438             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1439             :     PyObject* sys;
    1440             :     PyObject* default_encoding = NULL;
    1441             :     char* default_encoding_c;
    1442             :     sys = PyImport_ImportModule("sys");
    1443             :     if (!sys) goto bad;
    1444             :     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    1445             :     Py_DECREF(sys);
    1446             :     if (!default_encoding) goto bad;
    1447             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1448             :     if (!default_encoding_c) goto bad;
    1449             :     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    1450             :     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    1451             :     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    1452             :     Py_DECREF(default_encoding);
    1453             :     return 0;
    1454             : bad:
    1455             :     Py_XDECREF(default_encoding);
    1456             :     return -1;
    1457             : }
    1458             : #endif
    1459             : #endif
    1460             : 
    1461             : 
    1462             : /* Test for GCC > 2.95 */
    1463             : #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
    1464             :   #define likely(x)   __builtin_expect(!!(x), 1)
    1465             :   #define unlikely(x) __builtin_expect(!!(x), 0)
    1466             : #else /* !__GNUC__ or GCC < 2.95 */
    1467             :   #define likely(x)   (x)
    1468             :   #define unlikely(x) (x)
    1469             : #endif /* __GNUC__ */
    1470             : static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
    1471             : 
    1472             : #if !CYTHON_USE_MODULE_STATE
    1473             : static PyObject *__pyx_m = NULL;
    1474             : #endif
    1475             : static int __pyx_lineno;
    1476             : static int __pyx_clineno = 0;
    1477             : static const char * __pyx_cfilenm = __FILE__;
    1478             : static const char *__pyx_filename;
    1479             : 
    1480             : /* Header.proto */
    1481             : #if !defined(CYTHON_CCOMPLEX)
    1482             :   #if defined(__cplusplus)
    1483             :     #define CYTHON_CCOMPLEX 1
    1484             :   #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    1485             :     #define CYTHON_CCOMPLEX 1
    1486             :   #else
    1487             :     #define CYTHON_CCOMPLEX 0
    1488             :   #endif
    1489             : #endif
    1490             : #if CYTHON_CCOMPLEX
    1491             :   #ifdef __cplusplus
    1492             :     #include <complex>
    1493             :   #else
    1494             :     #include <complex.h>
    1495             :   #endif
    1496             : #endif
    1497             : #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
    1498             :   #undef _Complex_I
    1499             :   #define _Complex_I 1.0fj
    1500             : #endif
    1501             : 
    1502             : /* #### Code section: filename_table ### */
    1503             : 
    1504             : static const char *__pyx_f[] = {
    1505             :   "_trlib.pyx",
    1506             :   "<stringsource>",
    1507             :   "__init__.cython-30.pxd",
    1508             :   "type.pxd",
    1509             :   "messagestream.pxd",
    1510             : };
    1511             : /* #### Code section: utility_code_proto_before_types ### */
    1512             : /* ForceInitThreads.proto */
    1513             : #ifndef __PYX_FORCE_INIT_THREADS
    1514             :   #define __PYX_FORCE_INIT_THREADS 0
    1515             : #endif
    1516             : 
    1517             : /* NoFastGil.proto */
    1518             : #define __Pyx_PyGILState_Ensure PyGILState_Ensure
    1519             : #define __Pyx_PyGILState_Release PyGILState_Release
    1520             : #define __Pyx_FastGIL_Remember()
    1521             : #define __Pyx_FastGIL_Forget()
    1522             : #define __Pyx_FastGilFuncInit()
    1523             : 
    1524             : /* BufferFormatStructs.proto */
    1525             : struct __Pyx_StructField_;
    1526             : #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
    1527             : typedef struct {
    1528             :   const char* name;
    1529             :   struct __Pyx_StructField_* fields;
    1530             :   size_t size;
    1531             :   size_t arraysize[8];
    1532             :   int ndim;
    1533             :   char typegroup;
    1534             :   char is_unsigned;
    1535             :   int flags;
    1536             : } __Pyx_TypeInfo;
    1537             : typedef struct __Pyx_StructField_ {
    1538             :   __Pyx_TypeInfo* type;
    1539             :   const char* name;
    1540             :   size_t offset;
    1541             : } __Pyx_StructField;
    1542             : typedef struct {
    1543             :   __Pyx_StructField* field;
    1544             :   size_t parent_offset;
    1545             : } __Pyx_BufFmt_StackElem;
    1546             : typedef struct {
    1547             :   __Pyx_StructField root;
    1548             :   __Pyx_BufFmt_StackElem* head;
    1549             :   size_t fmt_offset;
    1550             :   size_t new_count, enc_count;
    1551             :   size_t struct_alignment;
    1552             :   int is_complex;
    1553             :   char enc_type;
    1554             :   char new_packmode;
    1555             :   char enc_packmode;
    1556             :   char is_valid_array;
    1557             : } __Pyx_BufFmt_Context;
    1558             : 
    1559             : /* Atomics.proto */
    1560             : #include <pythread.h>
    1561             : #ifndef CYTHON_ATOMICS
    1562             :     #define CYTHON_ATOMICS 1
    1563             : #endif
    1564             : #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
    1565             : #define __pyx_atomic_int_type int
    1566             : #define __pyx_nonatomic_int_type int
    1567             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1568             :                         (__STDC_VERSION__ >= 201112L) &&\
    1569             :                         !defined(__STDC_NO_ATOMICS__))
    1570             :     #include <stdatomic.h>
    1571             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1572             :                     (__cplusplus >= 201103L) ||\
    1573             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)))
    1574             :     #include <atomic>
    1575             : #endif
    1576             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1577             :                         (__STDC_VERSION__ >= 201112L) &&\
    1578             :                         !defined(__STDC_NO_ATOMICS__) &&\
    1579             :                        ATOMIC_INT_LOCK_FREE == 2)
    1580             :     #undef __pyx_atomic_int_type
    1581             :     #define __pyx_atomic_int_type atomic_int
    1582             :     #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    1583             :     #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    1584             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1585             :         #pragma message ("Using standard C atomics")
    1586             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1587             :         #warning "Using standard C atomics"
    1588             :     #endif
    1589             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1590             :                     (__cplusplus >= 201103L) ||\
    1591             : \
    1592             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
    1593             :                     ATOMIC_INT_LOCK_FREE == 2)
    1594             :     #undef __pyx_atomic_int_type
    1595             :     #define __pyx_atomic_int_type std::atomic_int
    1596             :     #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    1597             :     #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    1598             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1599             :         #pragma message ("Using standard C++ atomics")
    1600             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1601             :         #warning "Using standard C++ atomics"
    1602             :     #endif
    1603             : #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
    1604             :                     (__GNUC_MINOR__ > 1 ||\
    1605             :                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    1606             :     #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    1607             :     #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    1608             :     #ifdef __PYX_DEBUG_ATOMICS
    1609             :         #warning "Using GNU atomics"
    1610             :     #endif
    1611             : #elif CYTHON_ATOMICS && defined(_MSC_VER)
    1612             :     #include <intrin.h>
    1613             :     #undef __pyx_atomic_int_type
    1614             :     #define __pyx_atomic_int_type long
    1615             :     #undef __pyx_nonatomic_int_type
    1616             :     #define __pyx_nonatomic_int_type long
    1617             :     #pragma intrinsic (_InterlockedExchangeAdd)
    1618             :     #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    1619             :     #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    1620             :     #ifdef __PYX_DEBUG_ATOMICS
    1621             :         #pragma message ("Using MSVC atomics")
    1622             :     #endif
    1623             : #else
    1624             :     #undef CYTHON_ATOMICS
    1625             :     #define CYTHON_ATOMICS 0
    1626             :     #ifdef __PYX_DEBUG_ATOMICS
    1627             :         #warning "Not using atomics"
    1628             :     #endif
    1629             : #endif
    1630             : #if CYTHON_ATOMICS
    1631             :     #define __pyx_add_acquisition_count(memview)\
    1632             :              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    1633             :     #define __pyx_sub_acquisition_count(memview)\
    1634             :             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
    1635             : #else
    1636             :     #define __pyx_add_acquisition_count(memview)\
    1637             :             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1638             :     #define __pyx_sub_acquisition_count(memview)\
    1639             :             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1640             : #endif
    1641             : 
    1642             : /* MemviewSliceStruct.proto */
    1643             : struct __pyx_memoryview_obj;
    1644             : typedef struct {
    1645             :   struct __pyx_memoryview_obj *memview;
    1646             :   char *data;
    1647             :   Py_ssize_t shape[8];
    1648             :   Py_ssize_t strides[8];
    1649             :   Py_ssize_t suboffsets[8];
    1650             : } __Pyx_memviewslice;
    1651             : #define __Pyx_MemoryView_Len(m)  (m.shape[0])
    1652             : 
    1653             : /* #### Code section: numeric_typedefs ### */
    1654             : 
    1655             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
    1656             :  * # in Cython to enable them only on the right systems.
    1657             :  * 
    1658             :  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
    1659             :  * ctypedef npy_int16      int16_t
    1660             :  * ctypedef npy_int32      int32_t
    1661             :  */
    1662             : typedef npy_int8 __pyx_t_5numpy_int8_t;
    1663             : 
    1664             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770
    1665             :  * 
    1666             :  * ctypedef npy_int8       int8_t
    1667             :  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
    1668             :  * ctypedef npy_int32      int32_t
    1669             :  * ctypedef npy_int64      int64_t
    1670             :  */
    1671             : typedef npy_int16 __pyx_t_5numpy_int16_t;
    1672             : 
    1673             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771
    1674             :  * ctypedef npy_int8       int8_t
    1675             :  * ctypedef npy_int16      int16_t
    1676             :  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
    1677             :  * ctypedef npy_int64      int64_t
    1678             :  * #ctypedef npy_int96      int96_t
    1679             :  */
    1680             : typedef npy_int32 __pyx_t_5numpy_int32_t;
    1681             : 
    1682             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772
    1683             :  * ctypedef npy_int16      int16_t
    1684             :  * ctypedef npy_int32      int32_t
    1685             :  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
    1686             :  * #ctypedef npy_int96      int96_t
    1687             :  * #ctypedef npy_int128     int128_t
    1688             :  */
    1689             : typedef npy_int64 __pyx_t_5numpy_int64_t;
    1690             : 
    1691             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
    1692             :  * #ctypedef npy_int128     int128_t
    1693             :  * 
    1694             :  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
    1695             :  * ctypedef npy_uint16     uint16_t
    1696             :  * ctypedef npy_uint32     uint32_t
    1697             :  */
    1698             : typedef npy_uint8 __pyx_t_5numpy_uint8_t;
    1699             : 
    1700             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
    1701             :  * 
    1702             :  * ctypedef npy_uint8      uint8_t
    1703             :  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
    1704             :  * ctypedef npy_uint32     uint32_t
    1705             :  * ctypedef npy_uint64     uint64_t
    1706             :  */
    1707             : typedef npy_uint16 __pyx_t_5numpy_uint16_t;
    1708             : 
    1709             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778
    1710             :  * ctypedef npy_uint8      uint8_t
    1711             :  * ctypedef npy_uint16     uint16_t
    1712             :  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
    1713             :  * ctypedef npy_uint64     uint64_t
    1714             :  * #ctypedef npy_uint96     uint96_t
    1715             :  */
    1716             : typedef npy_uint32 __pyx_t_5numpy_uint32_t;
    1717             : 
    1718             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
    1719             :  * ctypedef npy_uint16     uint16_t
    1720             :  * ctypedef npy_uint32     uint32_t
    1721             :  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
    1722             :  * #ctypedef npy_uint96     uint96_t
    1723             :  * #ctypedef npy_uint128    uint128_t
    1724             :  */
    1725             : typedef npy_uint64 __pyx_t_5numpy_uint64_t;
    1726             : 
    1727             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
    1728             :  * #ctypedef npy_uint128    uint128_t
    1729             :  * 
    1730             :  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
    1731             :  * ctypedef npy_float64    float64_t
    1732             :  * #ctypedef npy_float80    float80_t
    1733             :  */
    1734             : typedef npy_float32 __pyx_t_5numpy_float32_t;
    1735             : 
    1736             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784
    1737             :  * 
    1738             :  * ctypedef npy_float32    float32_t
    1739             :  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
    1740             :  * #ctypedef npy_float80    float80_t
    1741             :  * #ctypedef npy_float128   float128_t
    1742             :  */
    1743             : typedef npy_float64 __pyx_t_5numpy_float64_t;
    1744             : 
    1745             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
    1746             :  * ctypedef double complex complex128_t
    1747             :  * 
    1748             :  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
    1749             :  * ctypedef npy_ulonglong  ulonglong_t
    1750             :  * 
    1751             :  */
    1752             : typedef npy_longlong __pyx_t_5numpy_longlong_t;
    1753             : 
    1754             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
    1755             :  * 
    1756             :  * ctypedef npy_longlong   longlong_t
    1757             :  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
    1758             :  * 
    1759             :  * ctypedef npy_intp       intp_t
    1760             :  */
    1761             : typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
    1762             : 
    1763             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794
    1764             :  * ctypedef npy_ulonglong  ulonglong_t
    1765             :  * 
    1766             :  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
    1767             :  * ctypedef npy_uintp      uintp_t
    1768             :  * 
    1769             :  */
    1770             : typedef npy_intp __pyx_t_5numpy_intp_t;
    1771             : 
    1772             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
    1773             :  * 
    1774             :  * ctypedef npy_intp       intp_t
    1775             :  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
    1776             :  * 
    1777             :  * ctypedef npy_double     float_t
    1778             :  */
    1779             : typedef npy_uintp __pyx_t_5numpy_uintp_t;
    1780             : 
    1781             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797
    1782             :  * ctypedef npy_uintp      uintp_t
    1783             :  * 
    1784             :  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
    1785             :  * ctypedef npy_double     double_t
    1786             :  * ctypedef npy_longdouble longdouble_t
    1787             :  */
    1788             : typedef npy_double __pyx_t_5numpy_float_t;
    1789             : 
    1790             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798
    1791             :  * 
    1792             :  * ctypedef npy_double     float_t
    1793             :  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
    1794             :  * ctypedef npy_longdouble longdouble_t
    1795             :  * 
    1796             :  */
    1797             : typedef npy_double __pyx_t_5numpy_double_t;
    1798             : 
    1799             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799
    1800             :  * ctypedef npy_double     float_t
    1801             :  * ctypedef npy_double     double_t
    1802             :  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
    1803             :  * 
    1804             :  * ctypedef float complex       cfloat_t
    1805             :  */
    1806             : typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
    1807             : /* #### Code section: complex_type_declarations ### */
    1808             : /* Declarations.proto */
    1809             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1810             :   #ifdef __cplusplus
    1811             :     typedef ::std::complex< float > __pyx_t_float_complex;
    1812             :   #else
    1813             :     typedef float _Complex __pyx_t_float_complex;
    1814             :   #endif
    1815             : #else
    1816             :     typedef struct { float real, imag; } __pyx_t_float_complex;
    1817             : #endif
    1818             : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
    1819             : 
    1820             : /* Declarations.proto */
    1821             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1822             :   #ifdef __cplusplus
    1823             :     typedef ::std::complex< double > __pyx_t_double_complex;
    1824             :   #else
    1825             :     typedef double _Complex __pyx_t_double_complex;
    1826             :   #endif
    1827             : #else
    1828             :     typedef struct { double real, imag; } __pyx_t_double_complex;
    1829             : #endif
    1830             : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
    1831             : 
    1832             : /* Declarations.proto */
    1833             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1834             :   #ifdef __cplusplus
    1835             :     typedef ::std::complex< long double > __pyx_t_long_double_complex;
    1836             :   #else
    1837             :     typedef long double _Complex __pyx_t_long_double_complex;
    1838             :   #endif
    1839             : #else
    1840             :     typedef struct { long double real, imag; } __pyx_t_long_double_complex;
    1841             : #endif
    1842             : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
    1843             : 
    1844             : /* #### Code section: type_declarations ### */
    1845             : 
    1846             : /*--- Type declarations ---*/
    1847             : struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream;
    1848             : struct __pyx_array_obj;
    1849             : struct __pyx_MemviewEnum_obj;
    1850             : struct __pyx_memoryview_obj;
    1851             : struct __pyx_memoryviewslice_obj;
    1852             : 
    1853             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095
    1854             :  * 
    1855             :  * # Iterator API added in v1.6
    1856             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil             # <<<<<<<<<<<<<<
    1857             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil
    1858             :  * 
    1859             :  */
    1860             : typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *);
    1861             : 
    1862             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096
    1863             :  * # Iterator API added in v1.6
    1864             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil
    1865             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil             # <<<<<<<<<<<<<<
    1866             :  * 
    1867             :  * cdef extern from "numpy/arrayobject.h":
    1868             :  */
    1869             : typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *);
    1870             : 
    1871             : /* "scipy/_lib/messagestream.pxd":5
    1872             :  * 
    1873             :  * @cython.final
    1874             :  * cdef class MessageStream:             # <<<<<<<<<<<<<<
    1875             :  *     cdef stdio.FILE *handle
    1876             :  *     cdef bytes _filename
    1877             :  */
    1878             : struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream {
    1879             :   PyObject_HEAD
    1880             :   struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream *__pyx_vtab;
    1881             :   FILE *handle;
    1882             :   PyObject *_filename;
    1883             :   int _removed;
    1884             :   size_t _memstream_size;
    1885             :   char *_memstream_ptr;
    1886             : };
    1887             : 
    1888             : 
    1889             : /* "View.MemoryView":114
    1890             :  * @cython.collection_type("sequence")
    1891             :  * @cname("__pyx_array")
    1892             :  * cdef class array:             # <<<<<<<<<<<<<<
    1893             :  * 
    1894             :  *     cdef:
    1895             :  */
    1896             : struct __pyx_array_obj {
    1897             :   PyObject_HEAD
    1898             :   struct __pyx_vtabstruct_array *__pyx_vtab;
    1899             :   char *data;
    1900             :   Py_ssize_t len;
    1901             :   char *format;
    1902             :   int ndim;
    1903             :   Py_ssize_t *_shape;
    1904             :   Py_ssize_t *_strides;
    1905             :   Py_ssize_t itemsize;
    1906             :   PyObject *mode;
    1907             :   PyObject *_format;
    1908             :   void (*callback_free_data)(void *);
    1909             :   int free_data;
    1910             :   int dtype_is_object;
    1911             : };
    1912             : 
    1913             : 
    1914             : /* "View.MemoryView":302
    1915             :  * 
    1916             :  * @cname('__pyx_MemviewEnum')
    1917             :  * cdef class Enum(object):             # <<<<<<<<<<<<<<
    1918             :  *     cdef object name
    1919             :  *     def __init__(self, name):
    1920             :  */
    1921             : struct __pyx_MemviewEnum_obj {
    1922             :   PyObject_HEAD
    1923             :   PyObject *name;
    1924             : };
    1925             : 
    1926             : 
    1927             : /* "View.MemoryView":337
    1928             :  * 
    1929             :  * @cname('__pyx_memoryview')
    1930             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1931             :  * 
    1932             :  *     cdef object obj
    1933             :  */
    1934             : struct __pyx_memoryview_obj {
    1935             :   PyObject_HEAD
    1936             :   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
    1937             :   PyObject *obj;
    1938             :   PyObject *_size;
    1939             :   PyObject *_array_interface;
    1940             :   PyThread_type_lock lock;
    1941             :   __pyx_atomic_int_type acquisition_count;
    1942             :   Py_buffer view;
    1943             :   int flags;
    1944             :   int dtype_is_object;
    1945             :   __Pyx_TypeInfo *typeinfo;
    1946             : };
    1947             : 
    1948             : 
    1949             : /* "View.MemoryView":952
    1950             :  * @cython.collection_type("sequence")
    1951             :  * @cname('__pyx_memoryviewslice')
    1952             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    1953             :  *     "Internal class for passing memoryview slices to Python"
    1954             :  * 
    1955             :  */
    1956             : struct __pyx_memoryviewslice_obj {
    1957             :   struct __pyx_memoryview_obj __pyx_base;
    1958             :   __Pyx_memviewslice from_slice;
    1959             :   PyObject *from_object;
    1960             :   PyObject *(*to_object_func)(char *);
    1961             :   int (*to_dtype_func)(char *, PyObject *);
    1962             : };
    1963             : 
    1964             : 
    1965             : 
    1966             : /* "scipy/_lib/messagestream.pxd":5
    1967             :  * 
    1968             :  * @cython.final
    1969             :  * cdef class MessageStream:             # <<<<<<<<<<<<<<
    1970             :  *     cdef stdio.FILE *handle
    1971             :  *     cdef bytes _filename
    1972             :  */
    1973             : 
    1974             : struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream {
    1975             :   PyObject *(*close)(struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream *, int __pyx_skip_dispatch);
    1976             : };
    1977             : static struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream *__pyx_vtabptr_5scipy_4_lib_13messagestream_MessageStream;
    1978             : 
    1979             : 
    1980             : /* "View.MemoryView":114
    1981             :  * @cython.collection_type("sequence")
    1982             :  * @cname("__pyx_array")
    1983             :  * cdef class array:             # <<<<<<<<<<<<<<
    1984             :  * 
    1985             :  *     cdef:
    1986             :  */
    1987             : 
    1988             : struct __pyx_vtabstruct_array {
    1989             :   PyObject *(*get_memview)(struct __pyx_array_obj *);
    1990             : };
    1991             : static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
    1992             : 
    1993             : 
    1994             : /* "View.MemoryView":337
    1995             :  * 
    1996             :  * @cname('__pyx_memoryview')
    1997             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1998             :  * 
    1999             :  *     cdef object obj
    2000             :  */
    2001             : 
    2002             : struct __pyx_vtabstruct_memoryview {
    2003             :   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
    2004             :   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
    2005             :   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2006             :   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
    2007             :   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2008             :   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
    2009             :   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
    2010             :   PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
    2011             : };
    2012             : static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
    2013             : 
    2014             : 
    2015             : /* "View.MemoryView":952
    2016             :  * @cython.collection_type("sequence")
    2017             :  * @cname('__pyx_memoryviewslice')
    2018             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    2019             :  *     "Internal class for passing memoryview slices to Python"
    2020             :  * 
    2021             :  */
    2022             : 
    2023             : struct __pyx_vtabstruct__memoryviewslice {
    2024             :   struct __pyx_vtabstruct_memoryview __pyx_base;
    2025             : };
    2026             : static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
    2027             : /* #### Code section: utility_code_proto ### */
    2028             : 
    2029             : /* --- Runtime support code (head) --- */
    2030             : /* Refnanny.proto */
    2031             : #ifndef CYTHON_REFNANNY
    2032             :   #define CYTHON_REFNANNY 0
    2033             : #endif
    2034             : #if CYTHON_REFNANNY
    2035             :   typedef struct {
    2036             :     void (*INCREF)(void*, PyObject*, Py_ssize_t);
    2037             :     void (*DECREF)(void*, PyObject*, Py_ssize_t);
    2038             :     void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    2039             :     void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    2040             :     void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    2041             :     void (*FinishContext)(void**);
    2042             :   } __Pyx_RefNannyAPIStruct;
    2043             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
    2044             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
    2045             :   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
    2046             : #ifdef WITH_THREAD
    2047             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2048             :           if (acquire_gil) {\
    2049             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2050             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2051             :               PyGILState_Release(__pyx_gilstate_save);\
    2052             :           } else {\
    2053             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2054             :           }
    2055             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2056             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2057             :               __Pyx_RefNannyFinishContext();\
    2058             :               PyGILState_Release(__pyx_gilstate_save);\
    2059             :           }
    2060             : #else
    2061             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2062             :           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
    2063             :   #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
    2064             : #endif
    2065             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2066             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2067             :               __Pyx_RefNannyFinishContext();\
    2068             :               PyGILState_Release(__pyx_gilstate_save);\
    2069             :           }
    2070             :   #define __Pyx_RefNannyFinishContext()\
    2071             :           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
    2072             :   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2073             :   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2074             :   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2075             :   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2076             :   #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
    2077             :   #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
    2078             :   #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
    2079             :   #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
    2080             : #else
    2081             :   #define __Pyx_RefNannyDeclarations
    2082             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)
    2083             :   #define __Pyx_RefNannyFinishContextNogil()
    2084             :   #define __Pyx_RefNannyFinishContext()
    2085             :   #define __Pyx_INCREF(r) Py_INCREF(r)
    2086             :   #define __Pyx_DECREF(r) Py_DECREF(r)
    2087             :   #define __Pyx_GOTREF(r)
    2088             :   #define __Pyx_GIVEREF(r)
    2089             :   #define __Pyx_XINCREF(r) Py_XINCREF(r)
    2090             :   #define __Pyx_XDECREF(r) Py_XDECREF(r)
    2091             :   #define __Pyx_XGOTREF(r)
    2092             :   #define __Pyx_XGIVEREF(r)
    2093             : #endif
    2094             : #define __Pyx_Py_XDECREF_SET(r, v) do {\
    2095             :         PyObject *tmp = (PyObject *) r;\
    2096             :         r = v; Py_XDECREF(tmp);\
    2097             :     } while (0)
    2098             : #define __Pyx_XDECREF_SET(r, v) do {\
    2099             :         PyObject *tmp = (PyObject *) r;\
    2100             :         r = v; __Pyx_XDECREF(tmp);\
    2101             :     } while (0)
    2102             : #define __Pyx_DECREF_SET(r, v) do {\
    2103             :         PyObject *tmp = (PyObject *) r;\
    2104             :         r = v; __Pyx_DECREF(tmp);\
    2105             :     } while (0)
    2106             : #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
    2107             : #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
    2108             : 
    2109             : /* PyErrExceptionMatches.proto */
    2110             : #if CYTHON_FAST_THREAD_STATE
    2111             : #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
    2112             : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
    2113             : #else
    2114             : #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
    2115             : #endif
    2116             : 
    2117             : /* PyThreadStateGet.proto */
    2118             : #if CYTHON_FAST_THREAD_STATE
    2119             : #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
    2120             : #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
    2121             : #if PY_VERSION_HEX >= 0x030C00A6
    2122             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
    2123             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
    2124             : #else
    2125             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
    2126             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
    2127             : #endif
    2128             : #else
    2129             : #define __Pyx_PyThreadState_declare
    2130             : #define __Pyx_PyThreadState_assign
    2131             : #define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
    2132             : #define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
    2133             : #endif
    2134             : 
    2135             : /* PyErrFetchRestore.proto */
    2136             : #if CYTHON_FAST_THREAD_STATE
    2137             : #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
    2138             : #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
    2139             : #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
    2140             : #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
    2141             : #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
    2142             : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2143             : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2144             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
    2145             : #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
    2146             : #else
    2147             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2148             : #endif
    2149             : #else
    2150             : #define __Pyx_PyErr_Clear() PyErr_Clear()
    2151             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2152             : #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
    2153             : #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
    2154             : #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
    2155             : #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
    2156             : #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
    2157             : #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
    2158             : #endif
    2159             : 
    2160             : /* PyObjectGetAttrStr.proto */
    2161             : #if CYTHON_USE_TYPE_SLOTS
    2162             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
    2163             : #else
    2164             : #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
    2165             : #endif
    2166             : 
    2167             : /* PyObjectGetAttrStrNoError.proto */
    2168             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
    2169             : 
    2170             : /* GetBuiltinName.proto */
    2171             : static PyObject *__Pyx_GetBuiltinName(PyObject *name);
    2172             : 
    2173             : /* TupleAndListFromArray.proto */
    2174             : #if CYTHON_COMPILING_IN_CPYTHON
    2175             : static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
    2176             : static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
    2177             : #endif
    2178             : 
    2179             : /* IncludeStringH.proto */
    2180             : #include <string.h>
    2181             : 
    2182             : /* BytesEquals.proto */
    2183             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
    2184             : 
    2185             : /* UnicodeEquals.proto */
    2186             : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
    2187             : 
    2188             : /* fastcall.proto */
    2189             : #if CYTHON_AVOID_BORROWED_REFS
    2190             :     #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
    2191             : #elif CYTHON_ASSUME_SAFE_MACROS
    2192             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
    2193             : #else
    2194             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
    2195             : #endif
    2196             : #if CYTHON_AVOID_BORROWED_REFS
    2197             :     #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    2198             :     #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
    2199             : #else
    2200             :     #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    2201             :     #define __Pyx_Arg_XDECREF_VARARGS(arg)
    2202             : #endif
    2203             : #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
    2204             : #define __Pyx_KwValues_VARARGS(args, nargs) NULL
    2205             : #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
    2206             : #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
    2207             : #if CYTHON_METH_FASTCALL
    2208             :     #define __Pyx_Arg_FASTCALL(args, i) args[i]
    2209             :     #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    2210             :     #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    2211             :     static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    2212             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2213             :     CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
    2214             :   #else
    2215             :     #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
    2216             :   #endif
    2217             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
    2218             :                                                    to have the same reference counting */
    2219             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg)
    2220             : #else
    2221             :     #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    2222             :     #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    2223             :     #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    2224             :     #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    2225             :     #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    2226             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    2227             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
    2228             : #endif
    2229             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    2230             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
    2231             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
    2232             : #else
    2233             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2234             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2235             : #endif
    2236             : 
    2237             : /* RaiseArgTupleInvalid.proto */
    2238             : static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    2239             :     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
    2240             : 
    2241             : /* RaiseDoubleKeywords.proto */
    2242             : static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
    2243             : 
    2244             : /* ParseKeywords.proto */
    2245             : static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    2246             :     PyObject **argnames[],
    2247             :     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    2248             :     const char* function_name);
    2249             : 
    2250             : /* ArgTypeTest.proto */
    2251             : #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    2252             :     ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
    2253             :         __Pyx__ArgTypeTest(obj, type, name, exact))
    2254             : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
    2255             : 
    2256             : /* RaiseException.proto */
    2257             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
    2258             : 
    2259             : /* PyFunctionFastCall.proto */
    2260             : #if CYTHON_FAST_PYCALL
    2261             : #if !CYTHON_VECTORCALL
    2262             : #define __Pyx_PyFunction_FastCall(func, args, nargs)\
    2263             :     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
    2264             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
    2265             : #endif
    2266             : #define __Pyx_BUILD_ASSERT_EXPR(cond)\
    2267             :     (sizeof(char [1 - 2*!(cond)]) - 1)
    2268             : #ifndef Py_MEMBER_SIZE
    2269             : #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
    2270             : #endif
    2271             : #if !CYTHON_VECTORCALL
    2272             : #if PY_VERSION_HEX >= 0x03080000
    2273             :   #include "frameobject.h"
    2274             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
    2275             :   #ifndef Py_BUILD_CORE
    2276             :     #define Py_BUILD_CORE 1
    2277             :   #endif
    2278             :   #include "internal/pycore_frame.h"
    2279             : #endif
    2280             :   #define __Pxy_PyFrame_Initialize_Offsets()
    2281             :   #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
    2282             : #else
    2283             :   static size_t __pyx_pyframe_localsplus_offset = 0;
    2284             :   #include "frameobject.h"
    2285             :   #define __Pxy_PyFrame_Initialize_Offsets()\
    2286             :     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
    2287             :      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
    2288             :   #define __Pyx_PyFrame_GetLocalsplus(frame)\
    2289             :     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
    2290             : #endif
    2291             : #endif
    2292             : #endif
    2293             : 
    2294             : /* PyObjectCall.proto */
    2295             : #if CYTHON_COMPILING_IN_CPYTHON
    2296             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
    2297             : #else
    2298             : #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
    2299             : #endif
    2300             : 
    2301             : /* PyObjectCallMethO.proto */
    2302             : #if CYTHON_COMPILING_IN_CPYTHON
    2303             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
    2304             : #endif
    2305             : 
    2306             : /* PyObjectFastCall.proto */
    2307             : #define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
    2308             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
    2309             : 
    2310             : /* RaiseUnexpectedTypeError.proto */
    2311             : static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
    2312             : 
    2313             : /* GCCDiagnostics.proto */
    2314             : #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
    2315             : #define __Pyx_HAS_GCC_DIAGNOSTIC
    2316             : #endif
    2317             : 
    2318             : /* BuildPyUnicode.proto */
    2319             : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
    2320             :                                                 int prepend_sign, char padding_char);
    2321             : 
    2322             : /* CIntToPyUnicode.proto */
    2323             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
    2324             : 
    2325             : /* CIntToPyUnicode.proto */
    2326             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
    2327             : 
    2328             : /* JoinPyUnicode.proto */
    2329             : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
    2330             :                                       Py_UCS4 max_char);
    2331             : 
    2332             : /* StrEquals.proto */
    2333             : #if PY_MAJOR_VERSION >= 3
    2334             : #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
    2335             : #else
    2336             : #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
    2337             : #endif
    2338             : 
    2339             : /* PyObjectFormatSimple.proto */
    2340             : #if CYTHON_COMPILING_IN_PYPY
    2341             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2342             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2343             :         PyObject_Format(s, f))
    2344             : #elif PY_MAJOR_VERSION < 3
    2345             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2346             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2347             :         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
    2348             :         PyObject_Format(s, f))
    2349             : #elif CYTHON_USE_TYPE_SLOTS
    2350             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2351             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2352             :         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
    2353             :         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
    2354             :         PyObject_Format(s, f))
    2355             : #else
    2356             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2357             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2358             :         PyObject_Format(s, f))
    2359             : #endif
    2360             : 
    2361             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2362             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
    2363             : /* GetAttr.proto */
    2364             : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
    2365             : 
    2366             : /* GetItemInt.proto */
    2367             : #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2368             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2369             :     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    2370             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
    2371             :                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
    2372             : #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2373             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2374             :     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2375             :     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
    2376             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
    2377             :                                                               int wraparound, int boundscheck);
    2378             : #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2379             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2380             :     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2381             :     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
    2382             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
    2383             :                                                               int wraparound, int boundscheck);
    2384             : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
    2385             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
    2386             :                                                      int is_list, int wraparound, int boundscheck);
    2387             : 
    2388             : /* PyObjectCallOneArg.proto */
    2389             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
    2390             : 
    2391             : /* ObjectGetItem.proto */
    2392             : #if CYTHON_USE_TYPE_SLOTS
    2393             : static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
    2394             : #else
    2395             : #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
    2396             : #endif
    2397             : 
    2398             : /* KeywordStringCheck.proto */
    2399             : static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
    2400             : 
    2401             : /* DivInt[Py_ssize_t].proto */
    2402             : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
    2403             : 
    2404             : /* UnaryNegOverflows.proto */
    2405             : #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
    2406             :         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
    2407             : 
    2408             : /* GetAttr3.proto */
    2409             : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
    2410             : 
    2411             : /* PyDictVersioning.proto */
    2412             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
    2413             : #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
    2414             : #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
    2415             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    2416             :     (version_var) = __PYX_GET_DICT_VERSION(dict);\
    2417             :     (cache_var) = (value);
    2418             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    2419             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2420             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2421             :     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
    2422             :         (VAR) = __pyx_dict_cached_value;\
    2423             :     } else {\
    2424             :         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
    2425             :         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    2426             :     }\
    2427             : }
    2428             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
    2429             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
    2430             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
    2431             : #else
    2432             : #define __PYX_GET_DICT_VERSION(dict)  (0)
    2433             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
    2434             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
    2435             : #endif
    2436             : 
    2437             : /* GetModuleGlobalName.proto */
    2438             : #if CYTHON_USE_DICT_VERSIONS
    2439             : #define __Pyx_GetModuleGlobalName(var, name)  do {\
    2440             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2441             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2442             :     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
    2443             :         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
    2444             :         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2445             : } while(0)
    2446             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    2447             :     PY_UINT64_T __pyx_dict_version;\
    2448             :     PyObject *__pyx_dict_cached_value;\
    2449             :     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2450             : } while(0)
    2451             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
    2452             : #else
    2453             : #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2454             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2455             : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
    2456             : #endif
    2457             : 
    2458             : /* AssertionsEnabled.proto */
    2459             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
    2460             :   #define __Pyx_init_assertions_enabled()  (0)
    2461             :   #define __pyx_assertions_enabled()  (1)
    2462             : #elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
    2463             :   static int __pyx_assertions_enabled_flag;
    2464             :   #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
    2465           3 :   static int __Pyx_init_assertions_enabled(void) {
    2466           3 :     PyObject *builtins, *debug, *debug_str;
    2467           3 :     int flag;
    2468           3 :     builtins = PyEval_GetBuiltins();
    2469           3 :     if (!builtins) goto bad;
    2470           3 :     debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    2471           3 :     if (!debug_str) goto bad;
    2472           3 :     debug = PyObject_GetItem(builtins, debug_str);
    2473           3 :     Py_DECREF(debug_str);
    2474           3 :     if (!debug) goto bad;
    2475           3 :     flag = PyObject_IsTrue(debug);
    2476           3 :     Py_DECREF(debug);
    2477           3 :     if (flag == -1) goto bad;
    2478           3 :     __pyx_assertions_enabled_flag = flag;
    2479           3 :     return 0;
    2480           0 :   bad:
    2481           0 :     __pyx_assertions_enabled_flag = 1;
    2482           0 :     return -1;
    2483             :   }
    2484             : #else
    2485             :   #define __Pyx_init_assertions_enabled()  (0)
    2486             :   #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
    2487             : #endif
    2488             : 
    2489             : /* RaiseTooManyValuesToUnpack.proto */
    2490             : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
    2491             : 
    2492             : /* RaiseNeedMoreValuesToUnpack.proto */
    2493             : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
    2494             : 
    2495             : /* RaiseNoneIterError.proto */
    2496             : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
    2497             : 
    2498             : /* ExtTypeTest.proto */
    2499             : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
    2500             : 
    2501             : /* GetTopmostException.proto */
    2502             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
    2503             : static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
    2504             : #endif
    2505             : 
    2506             : /* SaveResetException.proto */
    2507             : #if CYTHON_FAST_THREAD_STATE
    2508             : #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
    2509             : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2510             : #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
    2511             : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2512             : #else
    2513             : #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
    2514             : #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
    2515             : #endif
    2516             : 
    2517             : /* GetException.proto */
    2518             : #if CYTHON_FAST_THREAD_STATE
    2519             : #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
    2520             : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2521             : #else
    2522             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
    2523             : #endif
    2524             : 
    2525             : /* SwapException.proto */
    2526             : #if CYTHON_FAST_THREAD_STATE
    2527             : #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
    2528             : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2529             : #else
    2530             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
    2531             : #endif
    2532             : 
    2533             : /* Import.proto */
    2534             : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
    2535             : 
    2536             : /* ImportDottedModule.proto */
    2537             : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
    2538             : #if PY_MAJOR_VERSION >= 3
    2539             : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
    2540             : #endif
    2541             : 
    2542             : /* FastTypeChecks.proto */
    2543             : #if CYTHON_COMPILING_IN_CPYTHON
    2544             : #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
    2545             : #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
    2546             : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
    2547             : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
    2548             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
    2549             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
    2550             : #else
    2551             : #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
    2552             : #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
    2553             : #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
    2554             : #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
    2555             : #endif
    2556             : #define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
    2557             : #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
    2558             : 
    2559             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2560             : /* ListCompAppend.proto */
    2561             : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
    2562           0 : static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    2563           0 :     PyListObject* L = (PyListObject*) list;
    2564           0 :     Py_ssize_t len = Py_SIZE(list);
    2565           0 :     if (likely(L->allocated > len)) {
    2566           0 :         Py_INCREF(x);
    2567             :         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2568             :         L->ob_item[len] = x;
    2569             :         #else
    2570           0 :         PyList_SET_ITEM(list, len, x);
    2571             :         #endif
    2572           0 :         __Pyx_SET_SIZE(list, len + 1);
    2573           0 :         return 0;
    2574             :     }
    2575           0 :     return PyList_Append(list, x);
    2576             : }
    2577             : #else
    2578             : #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
    2579             : #endif
    2580             : 
    2581             : /* PySequenceMultiply.proto */
    2582             : #define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
    2583             : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
    2584             : 
    2585             : /* SetItemInt.proto */
    2586             : #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2587             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2588             :     __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    2589             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
    2590             :                __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
    2591             : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
    2592             : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
    2593             :                                                int is_list, int wraparound, int boundscheck);
    2594             : 
    2595             : /* RaiseUnboundLocalError.proto */
    2596             : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
    2597             : 
    2598             : /* DivInt[long].proto */
    2599             : static CYTHON_INLINE long __Pyx_div_long(long, long);
    2600             : 
    2601             : /* PySequenceContains.proto */
    2602           0 : static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    2603           0 :     int result = PySequence_Contains(seq, item);
    2604           0 :     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
    2605             : }
    2606             : 
    2607             : /* ImportFrom.proto */
    2608             : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
    2609             : 
    2610             : /* HasAttr.proto */
    2611             : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
    2612             : 
    2613             : /* PyObjectSetAttrStr.proto */
    2614             : #if CYTHON_USE_TYPE_SLOTS
    2615             : #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
    2616             : static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
    2617             : #else
    2618             : #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
    2619             : #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
    2620             : #endif
    2621             : 
    2622             : /* PyIntBinop.proto */
    2623             : #if !CYTHON_COMPILING_IN_PYPY
    2624             : static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
    2625             : #else
    2626             : #define __Pyx_PyInt_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
    2627             :     (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
    2628             : #endif
    2629             : 
    2630             : /* PyFloatBinop.proto */
    2631             : #if !CYTHON_COMPILING_IN_PYPY
    2632             : static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
    2633             : #else
    2634             : #define __Pyx_PyFloat_TrueDivideCObj(op1, op2, floatval, inplace, zerodivision_check)\
    2635             :     (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
    2636             : #endif
    2637             : 
    2638             : /* BufferIndexError.proto */
    2639             : static void __Pyx_RaiseBufferIndexError(int axis);
    2640             : 
    2641             : /* PyIntBinop.proto */
    2642             : #if !CYTHON_COMPILING_IN_PYPY
    2643             : static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
    2644             : #else
    2645             : #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    2646             :     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
    2647             : #endif
    2648             : 
    2649             : /* PyObjectCallNoArg.proto */
    2650             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
    2651             : 
    2652             : /* SliceObject.proto */
    2653             : #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
    2654             :     __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
    2655             : static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
    2656             :         PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
    2657             :         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
    2658             :         int has_cstart, int has_cstop, int wraparound);
    2659             : 
    2660             : /* SliceObject.proto */
    2661             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
    2662             :         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
    2663             :         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
    2664             :         int has_cstart, int has_cstop, int wraparound);
    2665             : 
    2666             : /* PyObject_GenericGetAttrNoDict.proto */
    2667             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2668             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
    2669             : #else
    2670             : #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
    2671             : #endif
    2672             : 
    2673             : /* PyObject_GenericGetAttr.proto */
    2674             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2675             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
    2676             : #else
    2677             : #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
    2678             : #endif
    2679             : 
    2680             : /* IncludeStructmemberH.proto */
    2681             : #include <structmember.h>
    2682             : 
    2683             : /* FixUpExtensionType.proto */
    2684             : #if CYTHON_USE_TYPE_SPECS
    2685             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
    2686             : #endif
    2687             : 
    2688             : /* PyObjectGetMethod.proto */
    2689             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
    2690             : 
    2691             : /* PyObjectCallMethod0.proto */
    2692             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
    2693             : 
    2694             : /* ValidateBasesTuple.proto */
    2695             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
    2696             : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
    2697             : #endif
    2698             : 
    2699             : /* PyType_Ready.proto */
    2700             : CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
    2701             : 
    2702             : /* SetVTable.proto */
    2703             : static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
    2704             : 
    2705             : /* GetVTable.proto */
    2706             : static void* __Pyx_GetVtable(PyTypeObject *type);
    2707             : 
    2708             : /* MergeVTables.proto */
    2709             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2710             : static int __Pyx_MergeVtables(PyTypeObject *type);
    2711             : #endif
    2712             : 
    2713             : /* SetupReduce.proto */
    2714             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2715             : static int __Pyx_setup_reduce(PyObject* type_obj);
    2716             : #endif
    2717             : 
    2718             : /* TypeImport.proto */
    2719             : #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
    2720             : #define __PYX_HAVE_RT_ImportType_proto_3_0_11
    2721             : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
    2722             : #include <stdalign.h>
    2723             : #endif
    2724             : #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
    2725             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
    2726             : #else
    2727             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
    2728             : #endif
    2729             : enum __Pyx_ImportType_CheckSize_3_0_11 {
    2730             :    __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
    2731             :    __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
    2732             :    __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
    2733             : };
    2734             : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
    2735             : #endif
    2736             : 
    2737             : /* Py3UpdateBases.proto */
    2738             : static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
    2739             : 
    2740             : /* CalculateMetaclass.proto */
    2741             : static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
    2742             : 
    2743             : /* FetchSharedCythonModule.proto */
    2744             : static PyObject *__Pyx_FetchSharedCythonABIModule(void);
    2745             : 
    2746             : /* FetchCommonType.proto */
    2747             : #if !CYTHON_USE_TYPE_SPECS
    2748             : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
    2749             : #else
    2750             : static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
    2751             : #endif
    2752             : 
    2753             : /* PyMethodNew.proto */
    2754             : #if CYTHON_COMPILING_IN_LIMITED_API
    2755             : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2756             :     PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    2757             :     CYTHON_UNUSED_VAR(typ);
    2758             :     if (!self)
    2759             :         return __Pyx_NewRef(func);
    2760             :     typesModule = PyImport_ImportModule("types");
    2761             :     if (!typesModule) return NULL;
    2762             :     methodType = PyObject_GetAttrString(typesModule, "MethodType");
    2763             :     Py_DECREF(typesModule);
    2764             :     if (!methodType) return NULL;
    2765             :     result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    2766             :     Py_DECREF(methodType);
    2767             :     return result;
    2768             : }
    2769             : #elif PY_MAJOR_VERSION >= 3
    2770           0 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2771           0 :     CYTHON_UNUSED_VAR(typ);
    2772           0 :     if (!self)
    2773           0 :         return __Pyx_NewRef(func);
    2774           0 :     return PyMethod_New(func, self);
    2775             : }
    2776             : #else
    2777             :     #define __Pyx_PyMethod_New PyMethod_New
    2778             : #endif
    2779             : 
    2780             : /* PyVectorcallFastCallDict.proto */
    2781             : #if CYTHON_METH_FASTCALL
    2782             : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
    2783             : #endif
    2784             : 
    2785             : /* CythonFunctionShared.proto */
    2786             : #define __Pyx_CyFunction_USED
    2787             : #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
    2788             : #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
    2789             : #define __Pyx_CYFUNCTION_CCLASS        0x04
    2790             : #define __Pyx_CYFUNCTION_COROUTINE     0x08
    2791             : #define __Pyx_CyFunction_GetClosure(f)\
    2792             :     (((__pyx_CyFunctionObject *) (f))->func_closure)
    2793             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2794             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2795             :       (((__pyx_CyFunctionObject *) (f))->func_classobj)
    2796             : #else
    2797             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2798             :       ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
    2799             : #endif
    2800             : #define __Pyx_CyFunction_SetClassObj(f, classobj)\
    2801             :     __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
    2802             : #define __Pyx_CyFunction_Defaults(type, f)\
    2803             :     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
    2804             : #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    2805             :     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
    2806             : typedef struct {
    2807             : #if CYTHON_COMPILING_IN_LIMITED_API
    2808             :     PyObject_HEAD
    2809             :     PyObject *func;
    2810             : #elif PY_VERSION_HEX < 0x030900B1
    2811             :     PyCFunctionObject func;
    2812             : #else
    2813             :     PyCMethodObject func;
    2814             : #endif
    2815             : #if CYTHON_BACKPORT_VECTORCALL
    2816             :     __pyx_vectorcallfunc func_vectorcall;
    2817             : #endif
    2818             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    2819             :     PyObject *func_weakreflist;
    2820             : #endif
    2821             :     PyObject *func_dict;
    2822             :     PyObject *func_name;
    2823             :     PyObject *func_qualname;
    2824             :     PyObject *func_doc;
    2825             :     PyObject *func_globals;
    2826             :     PyObject *func_code;
    2827             :     PyObject *func_closure;
    2828             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2829             :     PyObject *func_classobj;
    2830             : #endif
    2831             :     void *defaults;
    2832             :     int defaults_pyobjects;
    2833             :     size_t defaults_size;
    2834             :     int flags;
    2835             :     PyObject *defaults_tuple;
    2836             :     PyObject *defaults_kwdict;
    2837             :     PyObject *(*defaults_getter)(PyObject *);
    2838             :     PyObject *func_annotations;
    2839             :     PyObject *func_is_coroutine;
    2840             : } __pyx_CyFunctionObject;
    2841             : #undef __Pyx_CyOrPyCFunction_Check
    2842             : #define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
    2843             : #define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
    2844             : #define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
    2845             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
    2846             : #undef __Pyx_IsSameCFunction
    2847             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
    2848             : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
    2849             :                                       int flags, PyObject* qualname,
    2850             :                                       PyObject *closure,
    2851             :                                       PyObject *module, PyObject *globals,
    2852             :                                       PyObject* code);
    2853             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
    2854             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
    2855             :                                                          size_t size,
    2856             :                                                          int pyobjects);
    2857             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
    2858             :                                                             PyObject *tuple);
    2859             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
    2860             :                                                              PyObject *dict);
    2861             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
    2862             :                                                               PyObject *dict);
    2863             : static int __pyx_CyFunction_init(PyObject *module);
    2864             : #if CYTHON_METH_FASTCALL
    2865             : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2866             : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2867             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2868             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2869             : #if CYTHON_BACKPORT_VECTORCALL
    2870             : #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
    2871             : #else
    2872             : #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
    2873             : #endif
    2874             : #endif
    2875             : 
    2876             : /* CythonFunction.proto */
    2877             : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
    2878             :                                       int flags, PyObject* qualname,
    2879             :                                       PyObject *closure,
    2880             :                                       PyObject *module, PyObject *globals,
    2881             :                                       PyObject* code);
    2882             : 
    2883             : /* SetNameInClass.proto */
    2884             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    2885             : #define __Pyx_SetNameInClass(ns, name, value)\
    2886             :     (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
    2887             : #elif CYTHON_COMPILING_IN_CPYTHON
    2888             : #define __Pyx_SetNameInClass(ns, name, value)\
    2889             :     (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
    2890             : #else
    2891             : #define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
    2892             : #endif
    2893             : 
    2894             : /* PyObjectCall2Args.proto */
    2895             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
    2896             : 
    2897             : /* PyObjectLookupSpecial.proto */
    2898             : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    2899             : #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
    2900             : #define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
    2901             : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
    2902             : #else
    2903             : #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
    2904             : #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
    2905             : #endif
    2906             : 
    2907             : /* Py3ClassCreate.proto */
    2908             : static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
    2909             :                                            PyObject *mkw, PyObject *modname, PyObject *doc);
    2910             : static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
    2911             :                                       PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
    2912             : 
    2913             : /* CyFunctionClassCell.proto */
    2914             : static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);
    2915             : 
    2916             : /* CLineInTraceback.proto */
    2917             : #ifdef CYTHON_CLINE_IN_TRACEBACK
    2918             : #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
    2919             : #else
    2920             : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
    2921             : #endif
    2922             : 
    2923             : /* CodeObjectCache.proto */
    2924             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2925             : typedef struct {
    2926             :     PyCodeObject* code_object;
    2927             :     int code_line;
    2928             : } __Pyx_CodeObjectCacheEntry;
    2929             : struct __Pyx_CodeObjectCache {
    2930             :     int count;
    2931             :     int max_count;
    2932             :     __Pyx_CodeObjectCacheEntry* entries;
    2933             : };
    2934             : static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
    2935             : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
    2936             : static PyCodeObject *__pyx_find_code_object(int code_line);
    2937             : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
    2938             : #endif
    2939             : 
    2940             : /* AddTraceback.proto */
    2941             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
    2942             :                                int py_line, const char *filename);
    2943             : 
    2944             : #if PY_MAJOR_VERSION < 3
    2945             :     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    2946             :     static void __Pyx_ReleaseBuffer(Py_buffer *view);
    2947             : #else
    2948             :     #define __Pyx_GetBuffer PyObject_GetBuffer
    2949             :     #define __Pyx_ReleaseBuffer PyBuffer_Release
    2950             : #endif
    2951             : 
    2952             : 
    2953             : /* BufferStructDeclare.proto */
    2954             : typedef struct {
    2955             :   Py_ssize_t shape, strides, suboffsets;
    2956             : } __Pyx_Buf_DimInfo;
    2957             : typedef struct {
    2958             :   size_t refcount;
    2959             :   Py_buffer pybuffer;
    2960             : } __Pyx_Buffer;
    2961             : typedef struct {
    2962             :   __Pyx_Buffer *rcbuffer;
    2963             :   char *data;
    2964             :   __Pyx_Buf_DimInfo diminfo[8];
    2965             : } __Pyx_LocalBuf_ND;
    2966             : 
    2967             : /* MemviewSliceIsContig.proto */
    2968             : static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
    2969             : 
    2970             : /* OverlappingSlices.proto */
    2971             : static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
    2972             :                                 __Pyx_memviewslice *slice2,
    2973             :                                 int ndim, size_t itemsize);
    2974             : 
    2975             : /* IsLittleEndian.proto */
    2976             : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
    2977             : 
    2978             : /* BufferFormatCheck.proto */
    2979             : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
    2980             : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
    2981             :                               __Pyx_BufFmt_StackElem* stack,
    2982             :                               __Pyx_TypeInfo* type);
    2983             : 
    2984             : /* TypeInfoCompare.proto */
    2985             : static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
    2986             : 
    2987             : /* MemviewSliceValidateAndInit.proto */
    2988             : static int __Pyx_ValidateAndInit_memviewslice(
    2989             :                 int *axes_specs,
    2990             :                 int c_or_f_flag,
    2991             :                 int buf_flags,
    2992             :                 int ndim,
    2993             :                 __Pyx_TypeInfo *dtype,
    2994             :                 __Pyx_BufFmt_StackElem stack[],
    2995             :                 __Pyx_memviewslice *memviewslice,
    2996             :                 PyObject *original_obj);
    2997             : 
    2998             : /* ObjectToMemviewSlice.proto */
    2999             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
    3000             : 
    3001             : /* ObjectToMemviewSlice.proto */
    3002             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long(PyObject *, int writable_flag);
    3003             : 
    3004             : /* RealImag.proto */
    3005             : #if CYTHON_CCOMPLEX
    3006             :   #ifdef __cplusplus
    3007             :     #define __Pyx_CREAL(z) ((z).real())
    3008             :     #define __Pyx_CIMAG(z) ((z).imag())
    3009             :   #else
    3010             :     #define __Pyx_CREAL(z) (__real__(z))
    3011             :     #define __Pyx_CIMAG(z) (__imag__(z))
    3012             :   #endif
    3013             : #else
    3014             :     #define __Pyx_CREAL(z) ((z).real)
    3015             :     #define __Pyx_CIMAG(z) ((z).imag)
    3016             : #endif
    3017             : #if defined(__cplusplus) && CYTHON_CCOMPLEX\
    3018             :         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    3019             :     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    3020             :     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
    3021             : #else
    3022             :     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    3023             :     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
    3024             : #endif
    3025             : 
    3026             : /* Arithmetic.proto */
    3027             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3028             :     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    3029             :     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    3030             :     #define __Pyx_c_diff_float(a, b) ((a)-(b))
    3031             :     #define __Pyx_c_prod_float(a, b) ((a)*(b))
    3032             :     #define __Pyx_c_quot_float(a, b) ((a)/(b))
    3033             :     #define __Pyx_c_neg_float(a)     (-(a))
    3034             :   #ifdef __cplusplus
    3035             :     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    3036             :     #define __Pyx_c_conj_float(z)    (::std::conj(z))
    3037             :     #if 1
    3038             :         #define __Pyx_c_abs_float(z)     (::std::abs(z))
    3039             :         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    3040             :     #endif
    3041             :   #else
    3042             :     #define __Pyx_c_is_zero_float(z) ((z)==0)
    3043             :     #define __Pyx_c_conj_float(z)    (conjf(z))
    3044             :     #if 1
    3045             :         #define __Pyx_c_abs_float(z)     (cabsf(z))
    3046             :         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    3047             :     #endif
    3048             :  #endif
    3049             : #else
    3050             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3051             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3052             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3053             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3054             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3055             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    3056             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    3057             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    3058             :     #if 1
    3059             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
    3060             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3061             :     #endif
    3062             : #endif
    3063             : 
    3064             : /* Arithmetic.proto */
    3065             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3066             :     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    3067             :     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    3068             :     #define __Pyx_c_diff_double(a, b) ((a)-(b))
    3069             :     #define __Pyx_c_prod_double(a, b) ((a)*(b))
    3070             :     #define __Pyx_c_quot_double(a, b) ((a)/(b))
    3071             :     #define __Pyx_c_neg_double(a)     (-(a))
    3072             :   #ifdef __cplusplus
    3073             :     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    3074             :     #define __Pyx_c_conj_double(z)    (::std::conj(z))
    3075             :     #if 1
    3076             :         #define __Pyx_c_abs_double(z)     (::std::abs(z))
    3077             :         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    3078             :     #endif
    3079             :   #else
    3080             :     #define __Pyx_c_is_zero_double(z) ((z)==0)
    3081             :     #define __Pyx_c_conj_double(z)    (conj(z))
    3082             :     #if 1
    3083             :         #define __Pyx_c_abs_double(z)     (cabs(z))
    3084             :         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    3085             :     #endif
    3086             :  #endif
    3087             : #else
    3088             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3089             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3090             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3091             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3092             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3093             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    3094             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    3095             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    3096             :     #if 1
    3097             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
    3098             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3099             :     #endif
    3100             : #endif
    3101             : 
    3102             : /* Arithmetic.proto */
    3103             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3104             :     #define __Pyx_c_eq_long__double(a, b)   ((a)==(b))
    3105             :     #define __Pyx_c_sum_long__double(a, b)  ((a)+(b))
    3106             :     #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
    3107             :     #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
    3108             :     #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
    3109             :     #define __Pyx_c_neg_long__double(a)     (-(a))
    3110             :   #ifdef __cplusplus
    3111             :     #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
    3112             :     #define __Pyx_c_conj_long__double(z)    (::std::conj(z))
    3113             :     #if 1
    3114             :         #define __Pyx_c_abs_long__double(z)     (::std::abs(z))
    3115             :         #define __Pyx_c_pow_long__double(a, b)  (::std::pow(a, b))
    3116             :     #endif
    3117             :   #else
    3118             :     #define __Pyx_c_is_zero_long__double(z) ((z)==0)
    3119             :     #define __Pyx_c_conj_long__double(z)    (conjl(z))
    3120             :     #if 1
    3121             :         #define __Pyx_c_abs_long__double(z)     (cabsl(z))
    3122             :         #define __Pyx_c_pow_long__double(a, b)  (cpowl(a, b))
    3123             :     #endif
    3124             :  #endif
    3125             : #else
    3126             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3127             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3128             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3129             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3130             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3131             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
    3132             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
    3133             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
    3134             :     #if 1
    3135             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
    3136             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3137             :     #endif
    3138             : #endif
    3139             : 
    3140             : /* MemviewSliceCopyTemplate.proto */
    3141             : static __Pyx_memviewslice
    3142             : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
    3143             :                                  const char *mode, int ndim,
    3144             :                                  size_t sizeof_dtype, int contig_flag,
    3145             :                                  int dtype_is_object);
    3146             : 
    3147             : /* MemviewSliceInit.proto */
    3148             : #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
    3149             : #define __Pyx_MEMVIEW_DIRECT   1
    3150             : #define __Pyx_MEMVIEW_PTR      2
    3151             : #define __Pyx_MEMVIEW_FULL     4
    3152             : #define __Pyx_MEMVIEW_CONTIG   8
    3153             : #define __Pyx_MEMVIEW_STRIDED  16
    3154             : #define __Pyx_MEMVIEW_FOLLOW   32
    3155             : #define __Pyx_IS_C_CONTIG 1
    3156             : #define __Pyx_IS_F_CONTIG 2
    3157             : static int __Pyx_init_memviewslice(
    3158             :                 struct __pyx_memoryview_obj *memview,
    3159             :                 int ndim,
    3160             :                 __Pyx_memviewslice *memviewslice,
    3161             :                 int memview_is_new_reference);
    3162             : static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    3163             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3164             : static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    3165             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3166             : #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
    3167             : #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
    3168             : #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
    3169             : static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
    3170             : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
    3171             : 
    3172             : /* CIntToPy.proto */
    3173             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
    3174             : 
    3175             : /* CIntFromPy.proto */
    3176             : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
    3177             : 
    3178             : /* CIntFromPy.proto */
    3179             : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
    3180             : 
    3181             : /* CIntToPy.proto */
    3182             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
    3183             : 
    3184             : /* CIntFromPy.proto */
    3185             : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
    3186             : 
    3187             : /* FormatTypeName.proto */
    3188             : #if CYTHON_COMPILING_IN_LIMITED_API
    3189             : typedef PyObject *__Pyx_TypeName;
    3190             : #define __Pyx_FMT_TYPENAME "%U"
    3191             : static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
    3192             : #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
    3193             : #else
    3194             : typedef const char *__Pyx_TypeName;
    3195             : #define __Pyx_FMT_TYPENAME "%.200s"
    3196             : #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
    3197             : #define __Pyx_DECREF_TypeName(obj)
    3198             : #endif
    3199             : 
    3200             : /* CheckBinaryVersion.proto */
    3201             : static unsigned long __Pyx_get_runtime_version(void);
    3202             : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
    3203             : 
    3204             : /* InitStrings.proto */
    3205             : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
    3206             : 
    3207             : /* #### Code section: module_declarations ### */
    3208             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
    3209             : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
    3210             : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
    3211             : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
    3212             : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
    3213             : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
    3214             : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3215             : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3216             : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
    3217             : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3218             : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3219             : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
    3220             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
    3221             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
    3222             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
    3223             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
    3224             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
    3225             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
    3226             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3227             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3228             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3229             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3230             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3231             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3232             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
    3233             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
    3234             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
    3235             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
    3236             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
    3237             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
    3238             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
    3239             : 
    3240             : /* Module declarations from "scipy.optimize._trlib" */
    3241             : 
    3242             : /* Module declarations from "libc.string" */
    3243             : 
    3244             : /* Module declarations from "libc.stdio" */
    3245             : 
    3246             : /* Module declarations from "libc" */
    3247             : 
    3248             : /* Module declarations from "scipy.optimize._trlib.ctrlib" */
    3249             : 
    3250             : /* Module declarations from "__builtin__" */
    3251             : 
    3252             : /* Module declarations from "cpython.type" */
    3253             : 
    3254             : /* Module declarations from "cpython" */
    3255             : 
    3256             : /* Module declarations from "cpython.object" */
    3257             : 
    3258             : /* Module declarations from "cpython.ref" */
    3259             : 
    3260             : /* Module declarations from "numpy" */
    3261             : 
    3262             : /* Module declarations from "numpy" */
    3263             : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
    3264             : 
    3265             : /* Module declarations from "cython.view" */
    3266             : 
    3267             : /* Module declarations from "cython.dataclasses" */
    3268             : 
    3269             : /* Module declarations from "cython" */
    3270             : 
    3271             : /* Module declarations from "libc.stdlib" */
    3272             : 
    3273             : /* Module declarations from "scipy._lib.messagestream" */
    3274             : 
    3275             : /* Module declarations from "scipy.optimize._trlib._trlib" */
    3276             : static PyObject *__pyx_collections_abc_Sequence = 0;
    3277             : static PyObject *generic = 0;
    3278             : static PyObject *strided = 0;
    3279             : static PyObject *indirect = 0;
    3280             : static PyObject *contiguous = 0;
    3281             : static PyObject *indirect_contiguous = 0;
    3282             : static int __pyx_memoryview_thread_locks_used;
    3283             : static PyThread_type_lock __pyx_memoryview_thread_locks[8];
    3284             : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
    3285             : static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
    3286             : static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
    3287             : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
    3288             : static PyObject *_unellipsify(PyObject *, int); /*proto*/
    3289             : static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
    3290             : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
    3291             : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
    3292             : static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
    3293             : static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
    3294             : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
    3295             : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3296             : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3297             : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
    3298             : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3299             : static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
    3300             : static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
    3301             : static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
    3302             : static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
    3303             : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
    3304             : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
    3305             : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
    3306             : static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
    3307             : static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
    3308             : static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
    3309             : static int __pyx_memoryview_err_no_memory(void); /*proto*/
    3310             : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
    3311             : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
    3312             : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
    3313             : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3314             : static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3315             : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
    3316             : static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
    3317             : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
    3318             : /* #### Code section: typeinfo ### */
    3319             : static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
    3320             : static __Pyx_TypeInfo __Pyx_TypeInfo_long = { "long", NULL, sizeof(long), { 0 }, 0, __PYX_IS_UNSIGNED(long) ? 'U' : 'I', __PYX_IS_UNSIGNED(long), 0 };
    3321             : /* #### Code section: before_global_var ### */
    3322             : #define __Pyx_MODULE_NAME "scipy.optimize._trlib._trlib"
    3323             : extern int __pyx_module_is_main_scipy__optimize___trlib___trlib;
    3324             : int __pyx_module_is_main_scipy__optimize___trlib___trlib = 0;
    3325             : 
    3326             : /* Implementation of "scipy.optimize._trlib._trlib" */
    3327             : /* #### Code section: global_var ### */
    3328             : static PyObject *__pyx_builtin_super;
    3329             : static PyObject *__pyx_builtin_print;
    3330             : static PyObject *__pyx_builtin___import__;
    3331             : static PyObject *__pyx_builtin_ValueError;
    3332             : static PyObject *__pyx_builtin_MemoryError;
    3333             : static PyObject *__pyx_builtin_enumerate;
    3334             : static PyObject *__pyx_builtin_TypeError;
    3335             : static PyObject *__pyx_builtin_range;
    3336             : static PyObject *__pyx_builtin_AssertionError;
    3337             : static PyObject *__pyx_builtin_Ellipsis;
    3338             : static PyObject *__pyx_builtin_id;
    3339             : static PyObject *__pyx_builtin_IndexError;
    3340             : static PyObject *__pyx_builtin_ImportError;
    3341             : /* #### Code section: string_decls ### */
    3342             : static const char __pyx_k_[] = ": ";
    3343             : static const char __pyx_k_O[] = "O";
    3344             : static const char __pyx_k_Q[] = "Q";
    3345             : static const char __pyx_k_c[] = "c";
    3346             : static const char __pyx_k_g[] = "g";
    3347             : static const char __pyx_k_p[] = "p";
    3348             : static const char __pyx_k_s[] = "s";
    3349             : static const char __pyx_k_v[] = "v";
    3350             : static const char __pyx_k_x[] = "x";
    3351             : static const char __pyx_k_Hp[] = "Hp";
    3352             : static const char __pyx_k__2[] = ".";
    3353             : static const char __pyx_k__3[] = "*";
    3354             : static const char __pyx_k__6[] = "'";
    3355             : static const char __pyx_k__7[] = ")";
    3356             : static const char __pyx_k_gc[] = "gc";
    3357             : static const char __pyx_k_gm[] = "gm";
    3358             : static const char __pyx_k_id[] = "id";
    3359             : static const char __pyx_k_it[] = "it";
    3360             : static const char __pyx_k_np[] = "np";
    3361             : static const char __pyx_k__12[] = "";
    3362             : static const char __pyx_k__30[] = "?";
    3363             : static const char __pyx_k_abc[] = "abc";
    3364             : static const char __pyx_k_and[] = " and ";
    3365             : static const char __pyx_k_doc[] = "__doc__";
    3366             : static const char __pyx_k_dot[] = "dot";
    3367             : static const char __pyx_k_fun[] = "fun";
    3368             : static const char __pyx_k_get[] = "get";
    3369             : static const char __pyx_k_got[] = " (got ";
    3370             : static const char __pyx_k_jac[] = "jac";
    3371             : static const char __pyx_k_lam[] = "lam";
    3372             : static const char __pyx_k_msg[] = "msg";
    3373             : static const char __pyx_k_new[] = "__new__";
    3374             : static const char __pyx_k_obj[] = "obj";
    3375             : static const char __pyx_k_ret[] = "ret";
    3376             : static const char __pyx_k_sys[] = "sys";
    3377             : static const char __pyx_k_base[] = "base";
    3378             : static const char __pyx_k_dict[] = "__dict__";
    3379             : static const char __pyx_k_disp[] = "disp";
    3380             : static const char __pyx_k_flt1[] = "flt1";
    3381             : static const char __pyx_k_flt2[] = "flt2";
    3382             : static const char __pyx_k_flt3[] = "flt3";
    3383             : static const char __pyx_k_hess[] = "hess";
    3384             : static const char __pyx_k_init[] = "__init__";
    3385             : static const char __pyx_k_ityp[] = "ityp";
    3386             : static const char __pyx_k_long[] = "long";
    3387             : static const char __pyx_k_main[] = "__main__";
    3388             : static const char __pyx_k_mode[] = "mode";
    3389             : static const char __pyx_k_name[] = "name";
    3390             : static const char __pyx_k_ndim[] = "ndim";
    3391             : static const char __pyx_k_pack[] = "pack";
    3392             : static const char __pyx_k_self[] = "self";
    3393             : static const char __pyx_k_size[] = "size";
    3394             : static const char __pyx_k_spec[] = "__spec__";
    3395             : static const char __pyx_k_sqrt[] = "sqrt";
    3396             : static const char __pyx_k_step[] = "step";
    3397             : static const char __pyx_k_stop[] = "stop";
    3398             : static const char __pyx_k_test[] = "__test__";
    3399             : static const char __pyx_k_zero[] = "zero";
    3400             : static const char __pyx_k_ASCII[] = "ASCII";
    3401             : static const char __pyx_k_class[] = "__class__";
    3402             : static const char __pyx_k_clear[] = "clear";
    3403             : static const char __pyx_k_count[] = "count";
    3404             : static const char __pyx_k_dtype[] = "dtype";
    3405             : static const char __pyx_k_empty[] = "empty";
    3406             : static const char __pyx_k_error[] = "error";
    3407             : static const char __pyx_k_flags[] = "flags";
    3408             : static const char __pyx_k_fwork[] = "fwork";
    3409             : static const char __pyx_k_hessp[] = "hessp";
    3410             : static const char __pyx_k_index[] = "index";
    3411             : static const char __pyx_k_itmax[] = "itmax";
    3412             : static const char __pyx_k_iwork[] = "iwork";
    3413             : static const char __pyx_k_numpy[] = "numpy";
    3414             : static const char __pyx_k_print[] = "print";
    3415             : static const char __pyx_k_range[] = "range";
    3416             : static const char __pyx_k_shape[] = "shape";
    3417             : static const char __pyx_k_solve[] = "solve";
    3418             : static const char __pyx_k_start[] = "start";
    3419             : static const char __pyx_k_super[] = "super";
    3420             : static const char __pyx_k_zeros[] = "zeros";
    3421             : static const char __pyx_k_action[] = "action";
    3422             : static const char __pyx_k_enable[] = "enable";
    3423             : static const char __pyx_k_encode[] = "encode";
    3424             : static const char __pyx_k_format[] = "format";
    3425             : static const char __pyx_k_import[] = "__import__";
    3426             : static const char __pyx_k_init_2[] = "init";
    3427             : static const char __pyx_k_module[] = "__module__";
    3428             : static const char __pyx_k_name_2[] = "__name__";
    3429             : static const char __pyx_k_obj_lb[] = "obj_lb";
    3430             : static const char __pyx_k_pickle[] = "pickle";
    3431             : static const char __pyx_k_prefix[] = "prefix";
    3432             : static const char __pyx_k_reduce[] = "__reduce__";
    3433             : static const char __pyx_k_refine[] = "refine";
    3434             : static const char __pyx_k_struct[] = "struct";
    3435             : static const char __pyx_k_timing[] = "timing";
    3436             : static const char __pyx_k_unpack[] = "unpack";
    3437             : static const char __pyx_k_update[] = "update";
    3438             : static const char __pyx_k_disable[] = "disable";
    3439             : static const char __pyx_k_fortran[] = "fortran";
    3440             : static const char __pyx_k_g_dot_g[] = "g_dot_g";
    3441             : static const char __pyx_k_memview[] = "memview";
    3442             : static const char __pyx_k_prepare[] = "__prepare__";
    3443             : static const char __pyx_k_tol_a_b[] = "tol_a_b";
    3444             : static const char __pyx_k_tol_a_i[] = "tol_a_i";
    3445             : static const char __pyx_k_tol_r_b[] = "tol_r_b";
    3446             : static const char __pyx_k_tol_r_i[] = "tol_r_i";
    3447             : static const char __pyx_k_unicode[] = "unicode";
    3448             : static const char __pyx_k_v_dot_g[] = "v_dot_g";
    3449             : static const char __pyx_k_verbose[] = "verbose";
    3450             : static const char __pyx_k_Ellipsis[] = "Ellipsis";
    3451             : static const char __pyx_k_Sequence[] = "Sequence";
    3452             : static const char __pyx_k_equality[] = "equality";
    3453             : static const char __pyx_k_getstate[] = "__getstate__";
    3454             : static const char __pyx_k_itemsize[] = "itemsize";
    3455             : static const char __pyx_k_messages[] = "messages";
    3456             : static const char __pyx_k_p_dot_Hp[] = "p_dot_Hp";
    3457             : static const char __pyx_k_pyx_type[] = "__pyx_type";
    3458             : static const char __pyx_k_qualname[] = "__qualname__";
    3459             : static const char __pyx_k_register[] = "register";
    3460             : static const char __pyx_k_set_name[] = "__set_name__";
    3461             : static const char __pyx_k_setstate[] = "__setstate__";
    3462             : static const char __pyx_k_TypeError[] = "TypeError";
    3463             : static const char __pyx_k_convexify[] = "convexify";
    3464             : static const char __pyx_k_earlyterm[] = "earlyterm";
    3465             : static const char __pyx_k_enumerate[] = "enumerate";
    3466             : static const char __pyx_k_fwork_ptr[] = "fwork_ptr";
    3467             : static const char __pyx_k_h_pointer[] = "h_pointer";
    3468             : static const char __pyx_k_isenabled[] = "isenabled";
    3469             : static const char __pyx_k_iwork_ptr[] = "iwork_ptr";
    3470             : static const char __pyx_k_metaclass[] = "__metaclass__";
    3471             : static const char __pyx_k_pyx_state[] = "__pyx_state";
    3472             : static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
    3473             : static const char __pyx_k_tol_rel_b[] = "tol_rel_b";
    3474             : static const char __pyx_k_tol_rel_i[] = "tol_rel_i";
    3475             : static const char __pyx_k_IndexError[] = "IndexError";
    3476             : static const char __pyx_k_ValueError[] = "ValueError";
    3477             : static const char __pyx_k_fwork_size[] = "fwork_size";
    3478             : static const char __pyx_k_fwork_view[] = "fwork_view";
    3479             : static const char __pyx_k_iwork_size[] = "iwork_size";
    3480             : static const char __pyx_k_iwork_view[] = "iwork_view";
    3481             : static const char __pyx_k_pyx_result[] = "__pyx_result";
    3482             : static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
    3483             : static const char __pyx_k_timing_ptr[] = "timing_ptr";
    3484             : static const char __pyx_k_ImportError[] = "ImportError";
    3485             : static const char __pyx_k_MemoryError[] = "MemoryError";
    3486             : static const char __pyx_k_PickleError[] = "PickleError";
    3487             : static const char __pyx_k_collections[] = "collections";
    3488             : static const char __pyx_k_mro_entries[] = "__mro_entries__";
    3489             : static const char __pyx_k_timing_view[] = "timing_view";
    3490             : static const char __pyx_k_initializing[] = "_initializing";
    3491             : static const char __pyx_k_is_coroutine[] = "_is_coroutine";
    3492             : static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
    3493             : static const char __pyx_k_stringsource[] = "<stringsource>";
    3494             : static const char __pyx_k_trust_radius[] = "trust_radius";
    3495             : static const char __pyx_k_version_info[] = "version_info";
    3496             : static const char __pyx_k_class_getitem[] = "__class_getitem__";
    3497             : static const char __pyx_k_ctl_invariant[] = "ctl_invariant";
    3498             : static const char __pyx_k_init_subclass[] = "__init_subclass__";
    3499             : static const char __pyx_k_itmax_lanczos[] = "itmax_lanczos";
    3500             : static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
    3501             : static const char __pyx_k_AssertionError[] = "AssertionError";
    3502             : static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
    3503             : static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
    3504             : static const char __pyx_k_collections_abc[] = "collections.abc";
    3505             : static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
    3506             : static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
    3507             : static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
    3508             : static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
    3509             : static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
    3510             : static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
    3511             : static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
    3512             : static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
    3513             : static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
    3514             : static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
    3515             : static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
    3516             : static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
    3517             : static const char __pyx_k_BaseQuadraticSubproblem[] = "BaseQuadraticSubproblem";
    3518             : static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
    3519             : static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
    3520             : static const char __pyx_k_TRLIBQuadraticSubproblem[] = "TRLIBQuadraticSubproblem";
    3521             : static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
    3522             : static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
    3523             : static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
    3524             : static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
    3525             : static const char __pyx_k_scipy_optimize__trustregion[] = "scipy.optimize._trustregion";
    3526             : static const char __pyx_k_scipy_optimize__trlib__trlib[] = "scipy.optimize._trlib._trlib";
    3527             : static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
    3528             : static const char __pyx_k_TRLIBQuadraticSubproblem_solve[] = "TRLIBQuadraticSubproblem.solve";
    3529             : static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
    3530             : static const char __pyx_k_TRLIBQuadraticSubproblem___init[] = "TRLIBQuadraticSubproblem.__init__";
    3531             : static const char __pyx_k_home_czgdp18079_Quansight_scipy[] = "/home/czgdp18079/Quansight/scipy/scipy/optimize/_trlib/_trlib.pyx";
    3532             : static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
    3533             : static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
    3534             : static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
    3535             : static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
    3536             : static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
    3537             : static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
    3538             : static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
    3539             : static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
    3540             : static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
    3541             : static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
    3542             : static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
    3543             : static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
    3544             : static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
    3545             : static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
    3546             : static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import";
    3547             : static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import";
    3548             : static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
    3549             : /* #### Code section: decls ### */
    3550             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
    3551             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3552             : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3553             : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3554             : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3555             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
    3556             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
    3557             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
    3558             : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
    3559             : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3560             : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
    3561             : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3562             : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3563             : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
    3564             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
    3565             : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3566             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
    3567             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
    3568             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3569             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3570             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3571             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3572             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3573             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3574             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3575             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3576             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3577             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3578             : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3579             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3580             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3581             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3582             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3583             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3584             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3585             : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3586             : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3587             : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3588             : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3589             : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3590             : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
    3591             : static PyObject *__pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_fun, PyObject *__pyx_v_jac, PyObject *__pyx_v_hess, PyObject *__pyx_v_hessp, PyObject *__pyx_v_tol_rel_i, PyObject *__pyx_v_tol_rel_b, PyObject *__pyx_v_disp); /* proto */
    3592             : static PyObject *__pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_2solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, double __pyx_v_trust_radius); /* proto */
    3593             : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3594             : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3595             : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3596             : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3597             : /* #### Code section: late_includes ### */
    3598             : /* #### Code section: module_state ### */
    3599             : typedef struct {
    3600             :   PyObject *__pyx_d;
    3601             :   PyObject *__pyx_b;
    3602             :   PyObject *__pyx_cython_runtime;
    3603             :   PyObject *__pyx_empty_tuple;
    3604             :   PyObject *__pyx_empty_bytes;
    3605             :   PyObject *__pyx_empty_unicode;
    3606             :   #ifdef __Pyx_CyFunction_USED
    3607             :   PyTypeObject *__pyx_CyFunctionType;
    3608             :   #endif
    3609             :   #ifdef __Pyx_FusedFunction_USED
    3610             :   PyTypeObject *__pyx_FusedFunctionType;
    3611             :   #endif
    3612             :   #ifdef __Pyx_Generator_USED
    3613             :   PyTypeObject *__pyx_GeneratorType;
    3614             :   #endif
    3615             :   #ifdef __Pyx_IterableCoroutine_USED
    3616             :   PyTypeObject *__pyx_IterableCoroutineType;
    3617             :   #endif
    3618             :   #ifdef __Pyx_Coroutine_USED
    3619             :   PyTypeObject *__pyx_CoroutineAwaitType;
    3620             :   #endif
    3621             :   #ifdef __Pyx_Coroutine_USED
    3622             :   PyTypeObject *__pyx_CoroutineType;
    3623             :   #endif
    3624             :   #if CYTHON_USE_MODULE_STATE
    3625             :   #endif
    3626             :   #if CYTHON_USE_MODULE_STATE
    3627             :   #endif
    3628             :   #if CYTHON_USE_MODULE_STATE
    3629             :   #endif
    3630             :   #if CYTHON_USE_MODULE_STATE
    3631             :   #endif
    3632             :   #if CYTHON_USE_MODULE_STATE
    3633             :   #endif
    3634             :   #if CYTHON_USE_MODULE_STATE
    3635             :   #endif
    3636             :   #if CYTHON_USE_MODULE_STATE
    3637             :   #endif
    3638             :   PyTypeObject *__pyx_ptype_7cpython_4type_type;
    3639             :   #if CYTHON_USE_MODULE_STATE
    3640             :   #endif
    3641             :   #if CYTHON_USE_MODULE_STATE
    3642             :   #endif
    3643             :   #if CYTHON_USE_MODULE_STATE
    3644             :   #endif
    3645             :   #if CYTHON_USE_MODULE_STATE
    3646             :   #endif
    3647             :   #if CYTHON_USE_MODULE_STATE
    3648             :   #endif
    3649             :   PyTypeObject *__pyx_ptype_5numpy_dtype;
    3650             :   PyTypeObject *__pyx_ptype_5numpy_flatiter;
    3651             :   PyTypeObject *__pyx_ptype_5numpy_broadcast;
    3652             :   PyTypeObject *__pyx_ptype_5numpy_ndarray;
    3653             :   PyTypeObject *__pyx_ptype_5numpy_generic;
    3654             :   PyTypeObject *__pyx_ptype_5numpy_number;
    3655             :   PyTypeObject *__pyx_ptype_5numpy_integer;
    3656             :   PyTypeObject *__pyx_ptype_5numpy_signedinteger;
    3657             :   PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
    3658             :   PyTypeObject *__pyx_ptype_5numpy_inexact;
    3659             :   PyTypeObject *__pyx_ptype_5numpy_floating;
    3660             :   PyTypeObject *__pyx_ptype_5numpy_complexfloating;
    3661             :   PyTypeObject *__pyx_ptype_5numpy_flexible;
    3662             :   PyTypeObject *__pyx_ptype_5numpy_character;
    3663             :   PyTypeObject *__pyx_ptype_5numpy_ufunc;
    3664             :   #if CYTHON_USE_MODULE_STATE
    3665             :   #endif
    3666             :   #if CYTHON_USE_MODULE_STATE
    3667             :   #endif
    3668             :   #if CYTHON_USE_MODULE_STATE
    3669             :   #endif
    3670             :   #if CYTHON_USE_MODULE_STATE
    3671             :   #endif
    3672             :   #if CYTHON_USE_MODULE_STATE
    3673             :   #endif
    3674             :   PyTypeObject *__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream;
    3675             :   #if CYTHON_USE_MODULE_STATE
    3676             :   PyObject *__pyx_type___pyx_array;
    3677             :   PyObject *__pyx_type___pyx_MemviewEnum;
    3678             :   PyObject *__pyx_type___pyx_memoryview;
    3679             :   PyObject *__pyx_type___pyx_memoryviewslice;
    3680             :   #endif
    3681             :   PyTypeObject *__pyx_array_type;
    3682             :   PyTypeObject *__pyx_MemviewEnum_type;
    3683             :   PyTypeObject *__pyx_memoryview_type;
    3684             :   PyTypeObject *__pyx_memoryviewslice_type;
    3685             :   PyObject *__pyx_kp_u_;
    3686             :   PyObject *__pyx_n_s_ASCII;
    3687             :   PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
    3688             :   PyObject *__pyx_n_s_AssertionError;
    3689             :   PyObject *__pyx_n_s_BaseQuadraticSubproblem;
    3690             :   PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
    3691             :   PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
    3692             :   PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
    3693             :   PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
    3694             :   PyObject *__pyx_kp_u_Cannot_index_with_type;
    3695             :   PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
    3696             :   PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
    3697             :   PyObject *__pyx_n_s_Ellipsis;
    3698             :   PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
    3699             :   PyObject *__pyx_n_s_Hp;
    3700             :   PyObject *__pyx_n_s_ImportError;
    3701             :   PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
    3702             :   PyObject *__pyx_n_s_IndexError;
    3703             :   PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
    3704             :   PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
    3705             :   PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
    3706             :   PyObject *__pyx_kp_u_Invalid_shape_in_axis;
    3707             :   PyObject *__pyx_n_s_MemoryError;
    3708             :   PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
    3709             :   PyObject *__pyx_kp_s_MemoryView_of_r_object;
    3710             :   PyObject *__pyx_n_b_O;
    3711             :   PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    3712             :   PyObject *__pyx_n_s_PickleError;
    3713             :   PyObject *__pyx_n_s_Q;
    3714             :   PyObject *__pyx_n_s_Sequence;
    3715             :   PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
    3716             :   PyObject *__pyx_n_s_TRLIBQuadraticSubproblem;
    3717             :   PyObject *__pyx_n_s_TRLIBQuadraticSubproblem___init;
    3718             :   PyObject *__pyx_n_s_TRLIBQuadraticSubproblem_solve;
    3719             :   PyObject *__pyx_n_s_TypeError;
    3720             :   PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
    3721             :   PyObject *__pyx_n_s_ValueError;
    3722             :   PyObject *__pyx_n_s_View_MemoryView;
    3723             :   PyObject *__pyx_kp_b__12;
    3724             :   PyObject *__pyx_kp_u__2;
    3725             :   PyObject *__pyx_n_s__3;
    3726             :   PyObject *__pyx_n_s__30;
    3727             :   PyObject *__pyx_kp_u__6;
    3728             :   PyObject *__pyx_kp_u__7;
    3729             :   PyObject *__pyx_n_s_abc;
    3730             :   PyObject *__pyx_n_s_action;
    3731             :   PyObject *__pyx_n_s_allocate_buffer;
    3732             :   PyObject *__pyx_kp_u_and;
    3733             :   PyObject *__pyx_n_s_asyncio_coroutines;
    3734             :   PyObject *__pyx_n_s_base;
    3735             :   PyObject *__pyx_n_s_c;
    3736             :   PyObject *__pyx_n_u_c;
    3737             :   PyObject *__pyx_n_s_class;
    3738             :   PyObject *__pyx_n_s_class_getitem;
    3739             :   PyObject *__pyx_n_s_clear;
    3740             :   PyObject *__pyx_n_s_cline_in_traceback;
    3741             :   PyObject *__pyx_n_s_collections;
    3742             :   PyObject *__pyx_kp_s_collections_abc;
    3743             :   PyObject *__pyx_kp_s_contiguous_and_direct;
    3744             :   PyObject *__pyx_kp_s_contiguous_and_indirect;
    3745             :   PyObject *__pyx_n_s_convexify;
    3746             :   PyObject *__pyx_n_s_count;
    3747             :   PyObject *__pyx_n_s_ctl_invariant;
    3748             :   PyObject *__pyx_n_s_dict;
    3749             :   PyObject *__pyx_kp_u_disable;
    3750             :   PyObject *__pyx_n_s_disp;
    3751             :   PyObject *__pyx_n_s_doc;
    3752             :   PyObject *__pyx_n_s_dot;
    3753             :   PyObject *__pyx_n_s_dtype;
    3754             :   PyObject *__pyx_n_s_dtype_is_object;
    3755             :   PyObject *__pyx_n_s_earlyterm;
    3756             :   PyObject *__pyx_n_s_empty;
    3757             :   PyObject *__pyx_kp_u_enable;
    3758             :   PyObject *__pyx_n_s_encode;
    3759             :   PyObject *__pyx_n_s_enumerate;
    3760             :   PyObject *__pyx_n_s_equality;
    3761             :   PyObject *__pyx_n_s_error;
    3762             :   PyObject *__pyx_n_s_flags;
    3763             :   PyObject *__pyx_n_s_flt1;
    3764             :   PyObject *__pyx_n_s_flt2;
    3765             :   PyObject *__pyx_n_s_flt3;
    3766             :   PyObject *__pyx_n_s_format;
    3767             :   PyObject *__pyx_n_s_fortran;
    3768             :   PyObject *__pyx_n_u_fortran;
    3769             :   PyObject *__pyx_n_s_fun;
    3770             :   PyObject *__pyx_n_s_fwork;
    3771             :   PyObject *__pyx_n_s_fwork_ptr;
    3772             :   PyObject *__pyx_n_s_fwork_size;
    3773             :   PyObject *__pyx_n_s_fwork_view;
    3774             :   PyObject *__pyx_n_s_g;
    3775             :   PyObject *__pyx_n_s_g_dot_g;
    3776             :   PyObject *__pyx_kp_u_gc;
    3777             :   PyObject *__pyx_n_s_get;
    3778             :   PyObject *__pyx_n_s_getstate;
    3779             :   PyObject *__pyx_n_s_gm;
    3780             :   PyObject *__pyx_kp_u_got;
    3781             :   PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
    3782             :   PyObject *__pyx_n_s_h_pointer;
    3783             :   PyObject *__pyx_n_s_hess;
    3784             :   PyObject *__pyx_n_s_hessp;
    3785             :   PyObject *__pyx_kp_s_home_czgdp18079_Quansight_scipy;
    3786             :   PyObject *__pyx_n_s_id;
    3787             :   PyObject *__pyx_n_s_import;
    3788             :   PyObject *__pyx_n_s_index;
    3789             :   PyObject *__pyx_n_s_init;
    3790             :   PyObject *__pyx_n_s_init_2;
    3791             :   PyObject *__pyx_n_s_init_subclass;
    3792             :   PyObject *__pyx_n_s_initializing;
    3793             :   PyObject *__pyx_n_s_is_coroutine;
    3794             :   PyObject *__pyx_kp_u_isenabled;
    3795             :   PyObject *__pyx_n_s_it;
    3796             :   PyObject *__pyx_n_s_itemsize;
    3797             :   PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
    3798             :   PyObject *__pyx_n_s_itmax;
    3799             :   PyObject *__pyx_n_s_itmax_lanczos;
    3800             :   PyObject *__pyx_n_s_ityp;
    3801             :   PyObject *__pyx_n_s_iwork;
    3802             :   PyObject *__pyx_n_s_iwork_ptr;
    3803             :   PyObject *__pyx_n_s_iwork_size;
    3804             :   PyObject *__pyx_n_s_iwork_view;
    3805             :   PyObject *__pyx_n_s_jac;
    3806             :   PyObject *__pyx_n_s_lam;
    3807             :   PyObject *__pyx_n_u_long;
    3808             :   PyObject *__pyx_n_s_main;
    3809             :   PyObject *__pyx_n_s_memview;
    3810             :   PyObject *__pyx_n_s_messages;
    3811             :   PyObject *__pyx_n_s_metaclass;
    3812             :   PyObject *__pyx_n_s_mode;
    3813             :   PyObject *__pyx_n_s_module;
    3814             :   PyObject *__pyx_n_s_mro_entries;
    3815             :   PyObject *__pyx_n_s_msg;
    3816             :   PyObject *__pyx_n_s_name;
    3817             :   PyObject *__pyx_n_s_name_2;
    3818             :   PyObject *__pyx_n_s_ndim;
    3819             :   PyObject *__pyx_n_s_new;
    3820             :   PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
    3821             :   PyObject *__pyx_n_s_np;
    3822             :   PyObject *__pyx_n_s_numpy;
    3823             :   PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to;
    3824             :   PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo;
    3825             :   PyObject *__pyx_n_s_obj;
    3826             :   PyObject *__pyx_n_s_obj_lb;
    3827             :   PyObject *__pyx_n_s_p;
    3828             :   PyObject *__pyx_n_s_p_dot_Hp;
    3829             :   PyObject *__pyx_n_s_pack;
    3830             :   PyObject *__pyx_n_s_pickle;
    3831             :   PyObject *__pyx_n_s_prefix;
    3832             :   PyObject *__pyx_n_s_prepare;
    3833             :   PyObject *__pyx_n_s_print;
    3834             :   PyObject *__pyx_n_s_pyx_PickleError;
    3835             :   PyObject *__pyx_n_s_pyx_checksum;
    3836             :   PyObject *__pyx_n_s_pyx_result;
    3837             :   PyObject *__pyx_n_s_pyx_state;
    3838             :   PyObject *__pyx_n_s_pyx_type;
    3839             :   PyObject *__pyx_n_s_pyx_unpickle_Enum;
    3840             :   PyObject *__pyx_n_s_pyx_vtable;
    3841             :   PyObject *__pyx_n_s_qualname;
    3842             :   PyObject *__pyx_n_s_range;
    3843             :   PyObject *__pyx_n_s_reduce;
    3844             :   PyObject *__pyx_n_s_reduce_cython;
    3845             :   PyObject *__pyx_n_s_reduce_ex;
    3846             :   PyObject *__pyx_n_s_refine;
    3847             :   PyObject *__pyx_n_s_register;
    3848             :   PyObject *__pyx_n_s_ret;
    3849             :   PyObject *__pyx_n_s_s;
    3850             :   PyObject *__pyx_n_s_scipy_optimize__trlib__trlib;
    3851             :   PyObject *__pyx_n_s_scipy_optimize__trustregion;
    3852             :   PyObject *__pyx_n_s_self;
    3853             :   PyObject *__pyx_n_s_set_name;
    3854             :   PyObject *__pyx_n_s_setstate;
    3855             :   PyObject *__pyx_n_s_setstate_cython;
    3856             :   PyObject *__pyx_n_s_shape;
    3857             :   PyObject *__pyx_n_s_size;
    3858             :   PyObject *__pyx_n_s_solve;
    3859             :   PyObject *__pyx_n_s_spec;
    3860             :   PyObject *__pyx_n_s_sqrt;
    3861             :   PyObject *__pyx_n_s_start;
    3862             :   PyObject *__pyx_n_s_step;
    3863             :   PyObject *__pyx_n_s_stop;
    3864             :   PyObject *__pyx_kp_s_strided_and_direct;
    3865             :   PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
    3866             :   PyObject *__pyx_kp_s_strided_and_indirect;
    3867             :   PyObject *__pyx_kp_s_stringsource;
    3868             :   PyObject *__pyx_n_s_struct;
    3869             :   PyObject *__pyx_n_s_super;
    3870             :   PyObject *__pyx_n_s_sys;
    3871             :   PyObject *__pyx_n_s_test;
    3872             :   PyObject *__pyx_n_s_timing;
    3873             :   PyObject *__pyx_n_s_timing_ptr;
    3874             :   PyObject *__pyx_n_s_timing_view;
    3875             :   PyObject *__pyx_n_s_tol_a_b;
    3876             :   PyObject *__pyx_n_s_tol_a_i;
    3877             :   PyObject *__pyx_n_s_tol_r_b;
    3878             :   PyObject *__pyx_n_s_tol_r_i;
    3879             :   PyObject *__pyx_n_s_tol_rel_b;
    3880             :   PyObject *__pyx_n_s_tol_rel_i;
    3881             :   PyObject *__pyx_n_s_trust_radius;
    3882             :   PyObject *__pyx_kp_s_unable_to_allocate_array_data;
    3883             :   PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
    3884             :   PyObject *__pyx_n_s_unicode;
    3885             :   PyObject *__pyx_n_s_unpack;
    3886             :   PyObject *__pyx_n_s_update;
    3887             :   PyObject *__pyx_n_s_v;
    3888             :   PyObject *__pyx_n_s_v_dot_g;
    3889             :   PyObject *__pyx_n_s_verbose;
    3890             :   PyObject *__pyx_n_s_version_info;
    3891             :   PyObject *__pyx_n_s_x;
    3892             :   PyObject *__pyx_n_s_zero;
    3893             :   PyObject *__pyx_n_s_zeros;
    3894             :   PyObject *__pyx_float__5;
    3895             :   PyObject *__pyx_float_0_0;
    3896             :   PyObject *__pyx_float_1e9;
    3897             :   PyObject *__pyx_float_neg_2_0;
    3898             :   PyObject *__pyx_float_neg_3_0;
    3899             :   PyObject *__pyx_int_0;
    3900             :   PyObject *__pyx_int_1;
    3901             :   PyObject *__pyx_int_2;
    3902             :   PyObject *__pyx_int_3;
    3903             :   PyObject *__pyx_int_112105877;
    3904             :   PyObject *__pyx_int_136983863;
    3905             :   PyObject *__pyx_int_184977713;
    3906             :   PyObject *__pyx_int_neg_1;
    3907             :   PyObject *__pyx_slice__5;
    3908             :   PyObject *__pyx_tuple__4;
    3909             :   PyObject *__pyx_tuple__8;
    3910             :   PyObject *__pyx_tuple__9;
    3911             :   PyObject *__pyx_tuple__10;
    3912             :   PyObject *__pyx_tuple__11;
    3913             :   PyObject *__pyx_tuple__13;
    3914             :   PyObject *__pyx_tuple__14;
    3915             :   PyObject *__pyx_tuple__15;
    3916             :   PyObject *__pyx_tuple__16;
    3917             :   PyObject *__pyx_tuple__17;
    3918             :   PyObject *__pyx_tuple__18;
    3919             :   PyObject *__pyx_tuple__19;
    3920             :   PyObject *__pyx_tuple__20;
    3921             :   PyObject *__pyx_tuple__21;
    3922             :   PyObject *__pyx_tuple__22;
    3923             :   PyObject *__pyx_tuple__23;
    3924             :   PyObject *__pyx_tuple__25;
    3925             :   PyObject *__pyx_tuple__27;
    3926             :   PyObject *__pyx_tuple__28;
    3927             :   PyObject *__pyx_codeobj__24;
    3928             :   PyObject *__pyx_codeobj__26;
    3929             :   PyObject *__pyx_codeobj__29;
    3930             : } __pyx_mstate;
    3931             : 
    3932             : #if CYTHON_USE_MODULE_STATE
    3933             : #ifdef __cplusplus
    3934             : namespace {
    3935             :   extern struct PyModuleDef __pyx_moduledef;
    3936             : } /* anonymous namespace */
    3937             : #else
    3938             : static struct PyModuleDef __pyx_moduledef;
    3939             : #endif
    3940             : 
    3941             : #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
    3942             : 
    3943             : #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
    3944             : 
    3945             : #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
    3946             : #else
    3947             : static __pyx_mstate __pyx_mstate_global_static =
    3948             : #ifdef __cplusplus
    3949             :     {};
    3950             : #else
    3951             :     {0};
    3952             : #endif
    3953             : static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
    3954             : #endif
    3955             : /* #### Code section: module_state_clear ### */
    3956             : #if CYTHON_USE_MODULE_STATE
    3957             : static int __pyx_m_clear(PyObject *m) {
    3958             :   __pyx_mstate *clear_module_state = __pyx_mstate(m);
    3959             :   if (!clear_module_state) return 0;
    3960             :   Py_CLEAR(clear_module_state->__pyx_d);
    3961             :   Py_CLEAR(clear_module_state->__pyx_b);
    3962             :   Py_CLEAR(clear_module_state->__pyx_cython_runtime);
    3963             :   Py_CLEAR(clear_module_state->__pyx_empty_tuple);
    3964             :   Py_CLEAR(clear_module_state->__pyx_empty_bytes);
    3965             :   Py_CLEAR(clear_module_state->__pyx_empty_unicode);
    3966             :   #ifdef __Pyx_CyFunction_USED
    3967             :   Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
    3968             :   #endif
    3969             :   #ifdef __Pyx_FusedFunction_USED
    3970             :   Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
    3971             :   #endif
    3972             :   Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
    3973             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
    3974             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
    3975             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
    3976             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
    3977             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
    3978             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
    3979             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
    3980             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
    3981             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
    3982             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
    3983             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
    3984             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
    3985             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
    3986             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
    3987             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
    3988             :   Py_CLEAR(clear_module_state->__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream);
    3989             :   Py_CLEAR(clear_module_state->__pyx_array_type);
    3990             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
    3991             :   Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
    3992             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
    3993             :   Py_CLEAR(clear_module_state->__pyx_memoryview_type);
    3994             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
    3995             :   Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
    3996             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
    3997             :   Py_CLEAR(clear_module_state->__pyx_kp_u_);
    3998             :   Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
    3999             :   Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4000             :   Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
    4001             :   Py_CLEAR(clear_module_state->__pyx_n_s_BaseQuadraticSubproblem);
    4002             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4003             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4004             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4005             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4006             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
    4007             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4008             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4009             :   Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
    4010             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4011             :   Py_CLEAR(clear_module_state->__pyx_n_s_Hp);
    4012             :   Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
    4013             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4014             :   Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
    4015             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4016             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4017             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4018             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4019             :   Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
    4020             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4021             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4022             :   Py_CLEAR(clear_module_state->__pyx_n_b_O);
    4023             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4024             :   Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
    4025             :   Py_CLEAR(clear_module_state->__pyx_n_s_Q);
    4026             :   Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
    4027             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4028             :   Py_CLEAR(clear_module_state->__pyx_n_s_TRLIBQuadraticSubproblem);
    4029             :   Py_CLEAR(clear_module_state->__pyx_n_s_TRLIBQuadraticSubproblem___init);
    4030             :   Py_CLEAR(clear_module_state->__pyx_n_s_TRLIBQuadraticSubproblem_solve);
    4031             :   Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
    4032             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4033             :   Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
    4034             :   Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
    4035             :   Py_CLEAR(clear_module_state->__pyx_kp_b__12);
    4036             :   Py_CLEAR(clear_module_state->__pyx_kp_u__2);
    4037             :   Py_CLEAR(clear_module_state->__pyx_n_s__3);
    4038             :   Py_CLEAR(clear_module_state->__pyx_n_s__30);
    4039             :   Py_CLEAR(clear_module_state->__pyx_kp_u__6);
    4040             :   Py_CLEAR(clear_module_state->__pyx_kp_u__7);
    4041             :   Py_CLEAR(clear_module_state->__pyx_n_s_abc);
    4042             :   Py_CLEAR(clear_module_state->__pyx_n_s_action);
    4043             :   Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
    4044             :   Py_CLEAR(clear_module_state->__pyx_kp_u_and);
    4045             :   Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
    4046             :   Py_CLEAR(clear_module_state->__pyx_n_s_base);
    4047             :   Py_CLEAR(clear_module_state->__pyx_n_s_c);
    4048             :   Py_CLEAR(clear_module_state->__pyx_n_u_c);
    4049             :   Py_CLEAR(clear_module_state->__pyx_n_s_class);
    4050             :   Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
    4051             :   Py_CLEAR(clear_module_state->__pyx_n_s_clear);
    4052             :   Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
    4053             :   Py_CLEAR(clear_module_state->__pyx_n_s_collections);
    4054             :   Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
    4055             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
    4056             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
    4057             :   Py_CLEAR(clear_module_state->__pyx_n_s_convexify);
    4058             :   Py_CLEAR(clear_module_state->__pyx_n_s_count);
    4059             :   Py_CLEAR(clear_module_state->__pyx_n_s_ctl_invariant);
    4060             :   Py_CLEAR(clear_module_state->__pyx_n_s_dict);
    4061             :   Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
    4062             :   Py_CLEAR(clear_module_state->__pyx_n_s_disp);
    4063             :   Py_CLEAR(clear_module_state->__pyx_n_s_doc);
    4064             :   Py_CLEAR(clear_module_state->__pyx_n_s_dot);
    4065             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
    4066             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
    4067             :   Py_CLEAR(clear_module_state->__pyx_n_s_earlyterm);
    4068             :   Py_CLEAR(clear_module_state->__pyx_n_s_empty);
    4069             :   Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
    4070             :   Py_CLEAR(clear_module_state->__pyx_n_s_encode);
    4071             :   Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
    4072             :   Py_CLEAR(clear_module_state->__pyx_n_s_equality);
    4073             :   Py_CLEAR(clear_module_state->__pyx_n_s_error);
    4074             :   Py_CLEAR(clear_module_state->__pyx_n_s_flags);
    4075             :   Py_CLEAR(clear_module_state->__pyx_n_s_flt1);
    4076             :   Py_CLEAR(clear_module_state->__pyx_n_s_flt2);
    4077             :   Py_CLEAR(clear_module_state->__pyx_n_s_flt3);
    4078             :   Py_CLEAR(clear_module_state->__pyx_n_s_format);
    4079             :   Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
    4080             :   Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
    4081             :   Py_CLEAR(clear_module_state->__pyx_n_s_fun);
    4082             :   Py_CLEAR(clear_module_state->__pyx_n_s_fwork);
    4083             :   Py_CLEAR(clear_module_state->__pyx_n_s_fwork_ptr);
    4084             :   Py_CLEAR(clear_module_state->__pyx_n_s_fwork_size);
    4085             :   Py_CLEAR(clear_module_state->__pyx_n_s_fwork_view);
    4086             :   Py_CLEAR(clear_module_state->__pyx_n_s_g);
    4087             :   Py_CLEAR(clear_module_state->__pyx_n_s_g_dot_g);
    4088             :   Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
    4089             :   Py_CLEAR(clear_module_state->__pyx_n_s_get);
    4090             :   Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
    4091             :   Py_CLEAR(clear_module_state->__pyx_n_s_gm);
    4092             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got);
    4093             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4094             :   Py_CLEAR(clear_module_state->__pyx_n_s_h_pointer);
    4095             :   Py_CLEAR(clear_module_state->__pyx_n_s_hess);
    4096             :   Py_CLEAR(clear_module_state->__pyx_n_s_hessp);
    4097             :   Py_CLEAR(clear_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4098             :   Py_CLEAR(clear_module_state->__pyx_n_s_id);
    4099             :   Py_CLEAR(clear_module_state->__pyx_n_s_import);
    4100             :   Py_CLEAR(clear_module_state->__pyx_n_s_index);
    4101             :   Py_CLEAR(clear_module_state->__pyx_n_s_init);
    4102             :   Py_CLEAR(clear_module_state->__pyx_n_s_init_2);
    4103             :   Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
    4104             :   Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
    4105             :   Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
    4106             :   Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
    4107             :   Py_CLEAR(clear_module_state->__pyx_n_s_it);
    4108             :   Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
    4109             :   Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4110             :   Py_CLEAR(clear_module_state->__pyx_n_s_itmax);
    4111             :   Py_CLEAR(clear_module_state->__pyx_n_s_itmax_lanczos);
    4112             :   Py_CLEAR(clear_module_state->__pyx_n_s_ityp);
    4113             :   Py_CLEAR(clear_module_state->__pyx_n_s_iwork);
    4114             :   Py_CLEAR(clear_module_state->__pyx_n_s_iwork_ptr);
    4115             :   Py_CLEAR(clear_module_state->__pyx_n_s_iwork_size);
    4116             :   Py_CLEAR(clear_module_state->__pyx_n_s_iwork_view);
    4117             :   Py_CLEAR(clear_module_state->__pyx_n_s_jac);
    4118             :   Py_CLEAR(clear_module_state->__pyx_n_s_lam);
    4119             :   Py_CLEAR(clear_module_state->__pyx_n_u_long);
    4120             :   Py_CLEAR(clear_module_state->__pyx_n_s_main);
    4121             :   Py_CLEAR(clear_module_state->__pyx_n_s_memview);
    4122             :   Py_CLEAR(clear_module_state->__pyx_n_s_messages);
    4123             :   Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
    4124             :   Py_CLEAR(clear_module_state->__pyx_n_s_mode);
    4125             :   Py_CLEAR(clear_module_state->__pyx_n_s_module);
    4126             :   Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
    4127             :   Py_CLEAR(clear_module_state->__pyx_n_s_msg);
    4128             :   Py_CLEAR(clear_module_state->__pyx_n_s_name);
    4129             :   Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
    4130             :   Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
    4131             :   Py_CLEAR(clear_module_state->__pyx_n_s_new);
    4132             :   Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4133             :   Py_CLEAR(clear_module_state->__pyx_n_s_np);
    4134             :   Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
    4135             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    4136             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    4137             :   Py_CLEAR(clear_module_state->__pyx_n_s_obj);
    4138             :   Py_CLEAR(clear_module_state->__pyx_n_s_obj_lb);
    4139             :   Py_CLEAR(clear_module_state->__pyx_n_s_p);
    4140             :   Py_CLEAR(clear_module_state->__pyx_n_s_p_dot_Hp);
    4141             :   Py_CLEAR(clear_module_state->__pyx_n_s_pack);
    4142             :   Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
    4143             :   Py_CLEAR(clear_module_state->__pyx_n_s_prefix);
    4144             :   Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
    4145             :   Py_CLEAR(clear_module_state->__pyx_n_s_print);
    4146             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
    4147             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
    4148             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
    4149             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
    4150             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
    4151             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4152             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
    4153             :   Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
    4154             :   Py_CLEAR(clear_module_state->__pyx_n_s_range);
    4155             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
    4156             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
    4157             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
    4158             :   Py_CLEAR(clear_module_state->__pyx_n_s_refine);
    4159             :   Py_CLEAR(clear_module_state->__pyx_n_s_register);
    4160             :   Py_CLEAR(clear_module_state->__pyx_n_s_ret);
    4161             :   Py_CLEAR(clear_module_state->__pyx_n_s_s);
    4162             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_optimize__trlib__trlib);
    4163             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_optimize__trustregion);
    4164             :   Py_CLEAR(clear_module_state->__pyx_n_s_self);
    4165             :   Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
    4166             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
    4167             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
    4168             :   Py_CLEAR(clear_module_state->__pyx_n_s_shape);
    4169             :   Py_CLEAR(clear_module_state->__pyx_n_s_size);
    4170             :   Py_CLEAR(clear_module_state->__pyx_n_s_solve);
    4171             :   Py_CLEAR(clear_module_state->__pyx_n_s_spec);
    4172             :   Py_CLEAR(clear_module_state->__pyx_n_s_sqrt);
    4173             :   Py_CLEAR(clear_module_state->__pyx_n_s_start);
    4174             :   Py_CLEAR(clear_module_state->__pyx_n_s_step);
    4175             :   Py_CLEAR(clear_module_state->__pyx_n_s_stop);
    4176             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
    4177             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4178             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
    4179             :   Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
    4180             :   Py_CLEAR(clear_module_state->__pyx_n_s_struct);
    4181             :   Py_CLEAR(clear_module_state->__pyx_n_s_super);
    4182             :   Py_CLEAR(clear_module_state->__pyx_n_s_sys);
    4183             :   Py_CLEAR(clear_module_state->__pyx_n_s_test);
    4184             :   Py_CLEAR(clear_module_state->__pyx_n_s_timing);
    4185             :   Py_CLEAR(clear_module_state->__pyx_n_s_timing_ptr);
    4186             :   Py_CLEAR(clear_module_state->__pyx_n_s_timing_view);
    4187             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_a_b);
    4188             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_a_i);
    4189             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_r_b);
    4190             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_r_i);
    4191             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_rel_b);
    4192             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_rel_i);
    4193             :   Py_CLEAR(clear_module_state->__pyx_n_s_trust_radius);
    4194             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4195             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4196             :   Py_CLEAR(clear_module_state->__pyx_n_s_unicode);
    4197             :   Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
    4198             :   Py_CLEAR(clear_module_state->__pyx_n_s_update);
    4199             :   Py_CLEAR(clear_module_state->__pyx_n_s_v);
    4200             :   Py_CLEAR(clear_module_state->__pyx_n_s_v_dot_g);
    4201             :   Py_CLEAR(clear_module_state->__pyx_n_s_verbose);
    4202             :   Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
    4203             :   Py_CLEAR(clear_module_state->__pyx_n_s_x);
    4204             :   Py_CLEAR(clear_module_state->__pyx_n_s_zero);
    4205             :   Py_CLEAR(clear_module_state->__pyx_n_s_zeros);
    4206             :   Py_CLEAR(clear_module_state->__pyx_float__5);
    4207             :   Py_CLEAR(clear_module_state->__pyx_float_0_0);
    4208             :   Py_CLEAR(clear_module_state->__pyx_float_1e9);
    4209             :   Py_CLEAR(clear_module_state->__pyx_float_neg_2_0);
    4210             :   Py_CLEAR(clear_module_state->__pyx_float_neg_3_0);
    4211             :   Py_CLEAR(clear_module_state->__pyx_int_0);
    4212             :   Py_CLEAR(clear_module_state->__pyx_int_1);
    4213             :   Py_CLEAR(clear_module_state->__pyx_int_2);
    4214             :   Py_CLEAR(clear_module_state->__pyx_int_3);
    4215             :   Py_CLEAR(clear_module_state->__pyx_int_112105877);
    4216             :   Py_CLEAR(clear_module_state->__pyx_int_136983863);
    4217             :   Py_CLEAR(clear_module_state->__pyx_int_184977713);
    4218             :   Py_CLEAR(clear_module_state->__pyx_int_neg_1);
    4219             :   Py_CLEAR(clear_module_state->__pyx_slice__5);
    4220             :   Py_CLEAR(clear_module_state->__pyx_tuple__4);
    4221             :   Py_CLEAR(clear_module_state->__pyx_tuple__8);
    4222             :   Py_CLEAR(clear_module_state->__pyx_tuple__9);
    4223             :   Py_CLEAR(clear_module_state->__pyx_tuple__10);
    4224             :   Py_CLEAR(clear_module_state->__pyx_tuple__11);
    4225             :   Py_CLEAR(clear_module_state->__pyx_tuple__13);
    4226             :   Py_CLEAR(clear_module_state->__pyx_tuple__14);
    4227             :   Py_CLEAR(clear_module_state->__pyx_tuple__15);
    4228             :   Py_CLEAR(clear_module_state->__pyx_tuple__16);
    4229             :   Py_CLEAR(clear_module_state->__pyx_tuple__17);
    4230             :   Py_CLEAR(clear_module_state->__pyx_tuple__18);
    4231             :   Py_CLEAR(clear_module_state->__pyx_tuple__19);
    4232             :   Py_CLEAR(clear_module_state->__pyx_tuple__20);
    4233             :   Py_CLEAR(clear_module_state->__pyx_tuple__21);
    4234             :   Py_CLEAR(clear_module_state->__pyx_tuple__22);
    4235             :   Py_CLEAR(clear_module_state->__pyx_tuple__23);
    4236             :   Py_CLEAR(clear_module_state->__pyx_tuple__25);
    4237             :   Py_CLEAR(clear_module_state->__pyx_tuple__27);
    4238             :   Py_CLEAR(clear_module_state->__pyx_tuple__28);
    4239             :   Py_CLEAR(clear_module_state->__pyx_codeobj__24);
    4240             :   Py_CLEAR(clear_module_state->__pyx_codeobj__26);
    4241             :   Py_CLEAR(clear_module_state->__pyx_codeobj__29);
    4242             :   return 0;
    4243             : }
    4244             : #endif
    4245             : /* #### Code section: module_state_traverse ### */
    4246             : #if CYTHON_USE_MODULE_STATE
    4247             : static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
    4248             :   __pyx_mstate *traverse_module_state = __pyx_mstate(m);
    4249             :   if (!traverse_module_state) return 0;
    4250             :   Py_VISIT(traverse_module_state->__pyx_d);
    4251             :   Py_VISIT(traverse_module_state->__pyx_b);
    4252             :   Py_VISIT(traverse_module_state->__pyx_cython_runtime);
    4253             :   Py_VISIT(traverse_module_state->__pyx_empty_tuple);
    4254             :   Py_VISIT(traverse_module_state->__pyx_empty_bytes);
    4255             :   Py_VISIT(traverse_module_state->__pyx_empty_unicode);
    4256             :   #ifdef __Pyx_CyFunction_USED
    4257             :   Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
    4258             :   #endif
    4259             :   #ifdef __Pyx_FusedFunction_USED
    4260             :   Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
    4261             :   #endif
    4262             :   Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
    4263             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
    4264             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
    4265             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
    4266             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
    4267             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
    4268             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
    4269             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
    4270             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
    4271             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
    4272             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
    4273             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
    4274             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
    4275             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
    4276             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
    4277             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
    4278             :   Py_VISIT(traverse_module_state->__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream);
    4279             :   Py_VISIT(traverse_module_state->__pyx_array_type);
    4280             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
    4281             :   Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
    4282             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
    4283             :   Py_VISIT(traverse_module_state->__pyx_memoryview_type);
    4284             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
    4285             :   Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
    4286             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
    4287             :   Py_VISIT(traverse_module_state->__pyx_kp_u_);
    4288             :   Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
    4289             :   Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4290             :   Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
    4291             :   Py_VISIT(traverse_module_state->__pyx_n_s_BaseQuadraticSubproblem);
    4292             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4293             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4294             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4295             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4296             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
    4297             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4298             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4299             :   Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
    4300             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4301             :   Py_VISIT(traverse_module_state->__pyx_n_s_Hp);
    4302             :   Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
    4303             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4304             :   Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
    4305             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4306             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4307             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4308             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4309             :   Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
    4310             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4311             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4312             :   Py_VISIT(traverse_module_state->__pyx_n_b_O);
    4313             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4314             :   Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
    4315             :   Py_VISIT(traverse_module_state->__pyx_n_s_Q);
    4316             :   Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
    4317             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4318             :   Py_VISIT(traverse_module_state->__pyx_n_s_TRLIBQuadraticSubproblem);
    4319             :   Py_VISIT(traverse_module_state->__pyx_n_s_TRLIBQuadraticSubproblem___init);
    4320             :   Py_VISIT(traverse_module_state->__pyx_n_s_TRLIBQuadraticSubproblem_solve);
    4321             :   Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
    4322             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4323             :   Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
    4324             :   Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
    4325             :   Py_VISIT(traverse_module_state->__pyx_kp_b__12);
    4326             :   Py_VISIT(traverse_module_state->__pyx_kp_u__2);
    4327             :   Py_VISIT(traverse_module_state->__pyx_n_s__3);
    4328             :   Py_VISIT(traverse_module_state->__pyx_n_s__30);
    4329             :   Py_VISIT(traverse_module_state->__pyx_kp_u__6);
    4330             :   Py_VISIT(traverse_module_state->__pyx_kp_u__7);
    4331             :   Py_VISIT(traverse_module_state->__pyx_n_s_abc);
    4332             :   Py_VISIT(traverse_module_state->__pyx_n_s_action);
    4333             :   Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
    4334             :   Py_VISIT(traverse_module_state->__pyx_kp_u_and);
    4335             :   Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
    4336             :   Py_VISIT(traverse_module_state->__pyx_n_s_base);
    4337             :   Py_VISIT(traverse_module_state->__pyx_n_s_c);
    4338             :   Py_VISIT(traverse_module_state->__pyx_n_u_c);
    4339             :   Py_VISIT(traverse_module_state->__pyx_n_s_class);
    4340             :   Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
    4341             :   Py_VISIT(traverse_module_state->__pyx_n_s_clear);
    4342             :   Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
    4343             :   Py_VISIT(traverse_module_state->__pyx_n_s_collections);
    4344             :   Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
    4345             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
    4346             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
    4347             :   Py_VISIT(traverse_module_state->__pyx_n_s_convexify);
    4348             :   Py_VISIT(traverse_module_state->__pyx_n_s_count);
    4349             :   Py_VISIT(traverse_module_state->__pyx_n_s_ctl_invariant);
    4350             :   Py_VISIT(traverse_module_state->__pyx_n_s_dict);
    4351             :   Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
    4352             :   Py_VISIT(traverse_module_state->__pyx_n_s_disp);
    4353             :   Py_VISIT(traverse_module_state->__pyx_n_s_doc);
    4354             :   Py_VISIT(traverse_module_state->__pyx_n_s_dot);
    4355             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
    4356             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
    4357             :   Py_VISIT(traverse_module_state->__pyx_n_s_earlyterm);
    4358             :   Py_VISIT(traverse_module_state->__pyx_n_s_empty);
    4359             :   Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
    4360             :   Py_VISIT(traverse_module_state->__pyx_n_s_encode);
    4361             :   Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
    4362             :   Py_VISIT(traverse_module_state->__pyx_n_s_equality);
    4363             :   Py_VISIT(traverse_module_state->__pyx_n_s_error);
    4364             :   Py_VISIT(traverse_module_state->__pyx_n_s_flags);
    4365             :   Py_VISIT(traverse_module_state->__pyx_n_s_flt1);
    4366             :   Py_VISIT(traverse_module_state->__pyx_n_s_flt2);
    4367             :   Py_VISIT(traverse_module_state->__pyx_n_s_flt3);
    4368             :   Py_VISIT(traverse_module_state->__pyx_n_s_format);
    4369             :   Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
    4370             :   Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
    4371             :   Py_VISIT(traverse_module_state->__pyx_n_s_fun);
    4372             :   Py_VISIT(traverse_module_state->__pyx_n_s_fwork);
    4373             :   Py_VISIT(traverse_module_state->__pyx_n_s_fwork_ptr);
    4374             :   Py_VISIT(traverse_module_state->__pyx_n_s_fwork_size);
    4375             :   Py_VISIT(traverse_module_state->__pyx_n_s_fwork_view);
    4376             :   Py_VISIT(traverse_module_state->__pyx_n_s_g);
    4377             :   Py_VISIT(traverse_module_state->__pyx_n_s_g_dot_g);
    4378             :   Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
    4379             :   Py_VISIT(traverse_module_state->__pyx_n_s_get);
    4380             :   Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
    4381             :   Py_VISIT(traverse_module_state->__pyx_n_s_gm);
    4382             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got);
    4383             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4384             :   Py_VISIT(traverse_module_state->__pyx_n_s_h_pointer);
    4385             :   Py_VISIT(traverse_module_state->__pyx_n_s_hess);
    4386             :   Py_VISIT(traverse_module_state->__pyx_n_s_hessp);
    4387             :   Py_VISIT(traverse_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4388             :   Py_VISIT(traverse_module_state->__pyx_n_s_id);
    4389             :   Py_VISIT(traverse_module_state->__pyx_n_s_import);
    4390             :   Py_VISIT(traverse_module_state->__pyx_n_s_index);
    4391             :   Py_VISIT(traverse_module_state->__pyx_n_s_init);
    4392             :   Py_VISIT(traverse_module_state->__pyx_n_s_init_2);
    4393             :   Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
    4394             :   Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
    4395             :   Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
    4396             :   Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
    4397             :   Py_VISIT(traverse_module_state->__pyx_n_s_it);
    4398             :   Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
    4399             :   Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4400             :   Py_VISIT(traverse_module_state->__pyx_n_s_itmax);
    4401             :   Py_VISIT(traverse_module_state->__pyx_n_s_itmax_lanczos);
    4402             :   Py_VISIT(traverse_module_state->__pyx_n_s_ityp);
    4403             :   Py_VISIT(traverse_module_state->__pyx_n_s_iwork);
    4404             :   Py_VISIT(traverse_module_state->__pyx_n_s_iwork_ptr);
    4405             :   Py_VISIT(traverse_module_state->__pyx_n_s_iwork_size);
    4406             :   Py_VISIT(traverse_module_state->__pyx_n_s_iwork_view);
    4407             :   Py_VISIT(traverse_module_state->__pyx_n_s_jac);
    4408             :   Py_VISIT(traverse_module_state->__pyx_n_s_lam);
    4409             :   Py_VISIT(traverse_module_state->__pyx_n_u_long);
    4410             :   Py_VISIT(traverse_module_state->__pyx_n_s_main);
    4411             :   Py_VISIT(traverse_module_state->__pyx_n_s_memview);
    4412             :   Py_VISIT(traverse_module_state->__pyx_n_s_messages);
    4413             :   Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
    4414             :   Py_VISIT(traverse_module_state->__pyx_n_s_mode);
    4415             :   Py_VISIT(traverse_module_state->__pyx_n_s_module);
    4416             :   Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
    4417             :   Py_VISIT(traverse_module_state->__pyx_n_s_msg);
    4418             :   Py_VISIT(traverse_module_state->__pyx_n_s_name);
    4419             :   Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
    4420             :   Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
    4421             :   Py_VISIT(traverse_module_state->__pyx_n_s_new);
    4422             :   Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4423             :   Py_VISIT(traverse_module_state->__pyx_n_s_np);
    4424             :   Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
    4425             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    4426             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    4427             :   Py_VISIT(traverse_module_state->__pyx_n_s_obj);
    4428             :   Py_VISIT(traverse_module_state->__pyx_n_s_obj_lb);
    4429             :   Py_VISIT(traverse_module_state->__pyx_n_s_p);
    4430             :   Py_VISIT(traverse_module_state->__pyx_n_s_p_dot_Hp);
    4431             :   Py_VISIT(traverse_module_state->__pyx_n_s_pack);
    4432             :   Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
    4433             :   Py_VISIT(traverse_module_state->__pyx_n_s_prefix);
    4434             :   Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
    4435             :   Py_VISIT(traverse_module_state->__pyx_n_s_print);
    4436             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
    4437             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
    4438             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
    4439             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
    4440             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
    4441             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4442             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
    4443             :   Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
    4444             :   Py_VISIT(traverse_module_state->__pyx_n_s_range);
    4445             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
    4446             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
    4447             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
    4448             :   Py_VISIT(traverse_module_state->__pyx_n_s_refine);
    4449             :   Py_VISIT(traverse_module_state->__pyx_n_s_register);
    4450             :   Py_VISIT(traverse_module_state->__pyx_n_s_ret);
    4451             :   Py_VISIT(traverse_module_state->__pyx_n_s_s);
    4452             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_optimize__trlib__trlib);
    4453             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_optimize__trustregion);
    4454             :   Py_VISIT(traverse_module_state->__pyx_n_s_self);
    4455             :   Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
    4456             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
    4457             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
    4458             :   Py_VISIT(traverse_module_state->__pyx_n_s_shape);
    4459             :   Py_VISIT(traverse_module_state->__pyx_n_s_size);
    4460             :   Py_VISIT(traverse_module_state->__pyx_n_s_solve);
    4461             :   Py_VISIT(traverse_module_state->__pyx_n_s_spec);
    4462             :   Py_VISIT(traverse_module_state->__pyx_n_s_sqrt);
    4463             :   Py_VISIT(traverse_module_state->__pyx_n_s_start);
    4464             :   Py_VISIT(traverse_module_state->__pyx_n_s_step);
    4465             :   Py_VISIT(traverse_module_state->__pyx_n_s_stop);
    4466             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
    4467             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4468             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
    4469             :   Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
    4470             :   Py_VISIT(traverse_module_state->__pyx_n_s_struct);
    4471             :   Py_VISIT(traverse_module_state->__pyx_n_s_super);
    4472             :   Py_VISIT(traverse_module_state->__pyx_n_s_sys);
    4473             :   Py_VISIT(traverse_module_state->__pyx_n_s_test);
    4474             :   Py_VISIT(traverse_module_state->__pyx_n_s_timing);
    4475             :   Py_VISIT(traverse_module_state->__pyx_n_s_timing_ptr);
    4476             :   Py_VISIT(traverse_module_state->__pyx_n_s_timing_view);
    4477             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_a_b);
    4478             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_a_i);
    4479             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_r_b);
    4480             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_r_i);
    4481             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_rel_b);
    4482             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_rel_i);
    4483             :   Py_VISIT(traverse_module_state->__pyx_n_s_trust_radius);
    4484             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4485             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4486             :   Py_VISIT(traverse_module_state->__pyx_n_s_unicode);
    4487             :   Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
    4488             :   Py_VISIT(traverse_module_state->__pyx_n_s_update);
    4489             :   Py_VISIT(traverse_module_state->__pyx_n_s_v);
    4490             :   Py_VISIT(traverse_module_state->__pyx_n_s_v_dot_g);
    4491             :   Py_VISIT(traverse_module_state->__pyx_n_s_verbose);
    4492             :   Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
    4493             :   Py_VISIT(traverse_module_state->__pyx_n_s_x);
    4494             :   Py_VISIT(traverse_module_state->__pyx_n_s_zero);
    4495             :   Py_VISIT(traverse_module_state->__pyx_n_s_zeros);
    4496             :   Py_VISIT(traverse_module_state->__pyx_float__5);
    4497             :   Py_VISIT(traverse_module_state->__pyx_float_0_0);
    4498             :   Py_VISIT(traverse_module_state->__pyx_float_1e9);
    4499             :   Py_VISIT(traverse_module_state->__pyx_float_neg_2_0);
    4500             :   Py_VISIT(traverse_module_state->__pyx_float_neg_3_0);
    4501             :   Py_VISIT(traverse_module_state->__pyx_int_0);
    4502             :   Py_VISIT(traverse_module_state->__pyx_int_1);
    4503             :   Py_VISIT(traverse_module_state->__pyx_int_2);
    4504             :   Py_VISIT(traverse_module_state->__pyx_int_3);
    4505             :   Py_VISIT(traverse_module_state->__pyx_int_112105877);
    4506             :   Py_VISIT(traverse_module_state->__pyx_int_136983863);
    4507             :   Py_VISIT(traverse_module_state->__pyx_int_184977713);
    4508             :   Py_VISIT(traverse_module_state->__pyx_int_neg_1);
    4509             :   Py_VISIT(traverse_module_state->__pyx_slice__5);
    4510             :   Py_VISIT(traverse_module_state->__pyx_tuple__4);
    4511             :   Py_VISIT(traverse_module_state->__pyx_tuple__8);
    4512             :   Py_VISIT(traverse_module_state->__pyx_tuple__9);
    4513             :   Py_VISIT(traverse_module_state->__pyx_tuple__10);
    4514             :   Py_VISIT(traverse_module_state->__pyx_tuple__11);
    4515             :   Py_VISIT(traverse_module_state->__pyx_tuple__13);
    4516             :   Py_VISIT(traverse_module_state->__pyx_tuple__14);
    4517             :   Py_VISIT(traverse_module_state->__pyx_tuple__15);
    4518             :   Py_VISIT(traverse_module_state->__pyx_tuple__16);
    4519             :   Py_VISIT(traverse_module_state->__pyx_tuple__17);
    4520             :   Py_VISIT(traverse_module_state->__pyx_tuple__18);
    4521             :   Py_VISIT(traverse_module_state->__pyx_tuple__19);
    4522             :   Py_VISIT(traverse_module_state->__pyx_tuple__20);
    4523             :   Py_VISIT(traverse_module_state->__pyx_tuple__21);
    4524             :   Py_VISIT(traverse_module_state->__pyx_tuple__22);
    4525             :   Py_VISIT(traverse_module_state->__pyx_tuple__23);
    4526             :   Py_VISIT(traverse_module_state->__pyx_tuple__25);
    4527             :   Py_VISIT(traverse_module_state->__pyx_tuple__27);
    4528             :   Py_VISIT(traverse_module_state->__pyx_tuple__28);
    4529             :   Py_VISIT(traverse_module_state->__pyx_codeobj__24);
    4530             :   Py_VISIT(traverse_module_state->__pyx_codeobj__26);
    4531             :   Py_VISIT(traverse_module_state->__pyx_codeobj__29);
    4532             :   return 0;
    4533             : }
    4534             : #endif
    4535             : /* #### Code section: module_state_defines ### */
    4536             : #define __pyx_d __pyx_mstate_global->__pyx_d
    4537             : #define __pyx_b __pyx_mstate_global->__pyx_b
    4538             : #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
    4539             : #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
    4540             : #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
    4541             : #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
    4542             : #ifdef __Pyx_CyFunction_USED
    4543             : #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
    4544             : #endif
    4545             : #ifdef __Pyx_FusedFunction_USED
    4546             : #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
    4547             : #endif
    4548             : #ifdef __Pyx_Generator_USED
    4549             : #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
    4550             : #endif
    4551             : #ifdef __Pyx_IterableCoroutine_USED
    4552             : #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
    4553             : #endif
    4554             : #ifdef __Pyx_Coroutine_USED
    4555             : #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
    4556             : #endif
    4557             : #ifdef __Pyx_Coroutine_USED
    4558             : #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
    4559             : #endif
    4560             : #if CYTHON_USE_MODULE_STATE
    4561             : #endif
    4562             : #if CYTHON_USE_MODULE_STATE
    4563             : #endif
    4564             : #if CYTHON_USE_MODULE_STATE
    4565             : #endif
    4566             : #if CYTHON_USE_MODULE_STATE
    4567             : #endif
    4568             : #if CYTHON_USE_MODULE_STATE
    4569             : #endif
    4570             : #if CYTHON_USE_MODULE_STATE
    4571             : #endif
    4572             : #if CYTHON_USE_MODULE_STATE
    4573             : #endif
    4574             : #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
    4575             : #if CYTHON_USE_MODULE_STATE
    4576             : #endif
    4577             : #if CYTHON_USE_MODULE_STATE
    4578             : #endif
    4579             : #if CYTHON_USE_MODULE_STATE
    4580             : #endif
    4581             : #if CYTHON_USE_MODULE_STATE
    4582             : #endif
    4583             : #if CYTHON_USE_MODULE_STATE
    4584             : #endif
    4585             : #define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
    4586             : #define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
    4587             : #define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
    4588             : #define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
    4589             : #define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
    4590             : #define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
    4591             : #define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
    4592             : #define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
    4593             : #define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
    4594             : #define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
    4595             : #define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
    4596             : #define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
    4597             : #define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
    4598             : #define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
    4599             : #define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
    4600             : #if CYTHON_USE_MODULE_STATE
    4601             : #endif
    4602             : #if CYTHON_USE_MODULE_STATE
    4603             : #endif
    4604             : #if CYTHON_USE_MODULE_STATE
    4605             : #endif
    4606             : #if CYTHON_USE_MODULE_STATE
    4607             : #endif
    4608             : #if CYTHON_USE_MODULE_STATE
    4609             : #endif
    4610             : #define __pyx_ptype_5scipy_4_lib_13messagestream_MessageStream __pyx_mstate_global->__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream
    4611             : #if CYTHON_USE_MODULE_STATE
    4612             : #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
    4613             : #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
    4614             : #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
    4615             : #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
    4616             : #endif
    4617             : #define __pyx_array_type __pyx_mstate_global->__pyx_array_type
    4618             : #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
    4619             : #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
    4620             : #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
    4621             : #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
    4622             : #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
    4623             : #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
    4624             : #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
    4625             : #define __pyx_n_s_BaseQuadraticSubproblem __pyx_mstate_global->__pyx_n_s_BaseQuadraticSubproblem
    4626             : #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
    4627             : #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
    4628             : #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
    4629             : #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
    4630             : #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
    4631             : #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
    4632             : #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
    4633             : #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
    4634             : #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
    4635             : #define __pyx_n_s_Hp __pyx_mstate_global->__pyx_n_s_Hp
    4636             : #define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
    4637             : #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
    4638             : #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
    4639             : #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
    4640             : #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
    4641             : #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
    4642             : #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
    4643             : #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
    4644             : #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
    4645             : #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
    4646             : #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
    4647             : #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
    4648             : #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
    4649             : #define __pyx_n_s_Q __pyx_mstate_global->__pyx_n_s_Q
    4650             : #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
    4651             : #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
    4652             : #define __pyx_n_s_TRLIBQuadraticSubproblem __pyx_mstate_global->__pyx_n_s_TRLIBQuadraticSubproblem
    4653             : #define __pyx_n_s_TRLIBQuadraticSubproblem___init __pyx_mstate_global->__pyx_n_s_TRLIBQuadraticSubproblem___init
    4654             : #define __pyx_n_s_TRLIBQuadraticSubproblem_solve __pyx_mstate_global->__pyx_n_s_TRLIBQuadraticSubproblem_solve
    4655             : #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
    4656             : #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
    4657             : #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
    4658             : #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
    4659             : #define __pyx_kp_b__12 __pyx_mstate_global->__pyx_kp_b__12
    4660             : #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
    4661             : #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
    4662             : #define __pyx_n_s__30 __pyx_mstate_global->__pyx_n_s__30
    4663             : #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
    4664             : #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
    4665             : #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
    4666             : #define __pyx_n_s_action __pyx_mstate_global->__pyx_n_s_action
    4667             : #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
    4668             : #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
    4669             : #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
    4670             : #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
    4671             : #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
    4672             : #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
    4673             : #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
    4674             : #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
    4675             : #define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear
    4676             : #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
    4677             : #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
    4678             : #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
    4679             : #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
    4680             : #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
    4681             : #define __pyx_n_s_convexify __pyx_mstate_global->__pyx_n_s_convexify
    4682             : #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
    4683             : #define __pyx_n_s_ctl_invariant __pyx_mstate_global->__pyx_n_s_ctl_invariant
    4684             : #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
    4685             : #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
    4686             : #define __pyx_n_s_disp __pyx_mstate_global->__pyx_n_s_disp
    4687             : #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
    4688             : #define __pyx_n_s_dot __pyx_mstate_global->__pyx_n_s_dot
    4689             : #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
    4690             : #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
    4691             : #define __pyx_n_s_earlyterm __pyx_mstate_global->__pyx_n_s_earlyterm
    4692             : #define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
    4693             : #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
    4694             : #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
    4695             : #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
    4696             : #define __pyx_n_s_equality __pyx_mstate_global->__pyx_n_s_equality
    4697             : #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
    4698             : #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
    4699             : #define __pyx_n_s_flt1 __pyx_mstate_global->__pyx_n_s_flt1
    4700             : #define __pyx_n_s_flt2 __pyx_mstate_global->__pyx_n_s_flt2
    4701             : #define __pyx_n_s_flt3 __pyx_mstate_global->__pyx_n_s_flt3
    4702             : #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
    4703             : #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
    4704             : #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
    4705             : #define __pyx_n_s_fun __pyx_mstate_global->__pyx_n_s_fun
    4706             : #define __pyx_n_s_fwork __pyx_mstate_global->__pyx_n_s_fwork
    4707             : #define __pyx_n_s_fwork_ptr __pyx_mstate_global->__pyx_n_s_fwork_ptr
    4708             : #define __pyx_n_s_fwork_size __pyx_mstate_global->__pyx_n_s_fwork_size
    4709             : #define __pyx_n_s_fwork_view __pyx_mstate_global->__pyx_n_s_fwork_view
    4710             : #define __pyx_n_s_g __pyx_mstate_global->__pyx_n_s_g
    4711             : #define __pyx_n_s_g_dot_g __pyx_mstate_global->__pyx_n_s_g_dot_g
    4712             : #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
    4713             : #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
    4714             : #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
    4715             : #define __pyx_n_s_gm __pyx_mstate_global->__pyx_n_s_gm
    4716             : #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
    4717             : #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
    4718             : #define __pyx_n_s_h_pointer __pyx_mstate_global->__pyx_n_s_h_pointer
    4719             : #define __pyx_n_s_hess __pyx_mstate_global->__pyx_n_s_hess
    4720             : #define __pyx_n_s_hessp __pyx_mstate_global->__pyx_n_s_hessp
    4721             : #define __pyx_kp_s_home_czgdp18079_Quansight_scipy __pyx_mstate_global->__pyx_kp_s_home_czgdp18079_Quansight_scipy
    4722             : #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
    4723             : #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
    4724             : #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
    4725             : #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
    4726             : #define __pyx_n_s_init_2 __pyx_mstate_global->__pyx_n_s_init_2
    4727             : #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
    4728             : #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
    4729             : #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
    4730             : #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
    4731             : #define __pyx_n_s_it __pyx_mstate_global->__pyx_n_s_it
    4732             : #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
    4733             : #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
    4734             : #define __pyx_n_s_itmax __pyx_mstate_global->__pyx_n_s_itmax
    4735             : #define __pyx_n_s_itmax_lanczos __pyx_mstate_global->__pyx_n_s_itmax_lanczos
    4736             : #define __pyx_n_s_ityp __pyx_mstate_global->__pyx_n_s_ityp
    4737             : #define __pyx_n_s_iwork __pyx_mstate_global->__pyx_n_s_iwork
    4738             : #define __pyx_n_s_iwork_ptr __pyx_mstate_global->__pyx_n_s_iwork_ptr
    4739             : #define __pyx_n_s_iwork_size __pyx_mstate_global->__pyx_n_s_iwork_size
    4740             : #define __pyx_n_s_iwork_view __pyx_mstate_global->__pyx_n_s_iwork_view
    4741             : #define __pyx_n_s_jac __pyx_mstate_global->__pyx_n_s_jac
    4742             : #define __pyx_n_s_lam __pyx_mstate_global->__pyx_n_s_lam
    4743             : #define __pyx_n_u_long __pyx_mstate_global->__pyx_n_u_long
    4744             : #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
    4745             : #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
    4746             : #define __pyx_n_s_messages __pyx_mstate_global->__pyx_n_s_messages
    4747             : #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
    4748             : #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
    4749             : #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
    4750             : #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
    4751             : #define __pyx_n_s_msg __pyx_mstate_global->__pyx_n_s_msg
    4752             : #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
    4753             : #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
    4754             : #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
    4755             : #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
    4756             : #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
    4757             : #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
    4758             : #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
    4759             : #define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to
    4760             : #define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo
    4761             : #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
    4762             : #define __pyx_n_s_obj_lb __pyx_mstate_global->__pyx_n_s_obj_lb
    4763             : #define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p
    4764             : #define __pyx_n_s_p_dot_Hp __pyx_mstate_global->__pyx_n_s_p_dot_Hp
    4765             : #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
    4766             : #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
    4767             : #define __pyx_n_s_prefix __pyx_mstate_global->__pyx_n_s_prefix
    4768             : #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
    4769             : #define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
    4770             : #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
    4771             : #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
    4772             : #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
    4773             : #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
    4774             : #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
    4775             : #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
    4776             : #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
    4777             : #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
    4778             : #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
    4779             : #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
    4780             : #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
    4781             : #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
    4782             : #define __pyx_n_s_refine __pyx_mstate_global->__pyx_n_s_refine
    4783             : #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
    4784             : #define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret
    4785             : #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
    4786             : #define __pyx_n_s_scipy_optimize__trlib__trlib __pyx_mstate_global->__pyx_n_s_scipy_optimize__trlib__trlib
    4787             : #define __pyx_n_s_scipy_optimize__trustregion __pyx_mstate_global->__pyx_n_s_scipy_optimize__trustregion
    4788             : #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
    4789             : #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
    4790             : #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
    4791             : #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
    4792             : #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
    4793             : #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
    4794             : #define __pyx_n_s_solve __pyx_mstate_global->__pyx_n_s_solve
    4795             : #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
    4796             : #define __pyx_n_s_sqrt __pyx_mstate_global->__pyx_n_s_sqrt
    4797             : #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
    4798             : #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
    4799             : #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
    4800             : #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
    4801             : #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
    4802             : #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
    4803             : #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
    4804             : #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
    4805             : #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
    4806             : #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
    4807             : #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
    4808             : #define __pyx_n_s_timing __pyx_mstate_global->__pyx_n_s_timing
    4809             : #define __pyx_n_s_timing_ptr __pyx_mstate_global->__pyx_n_s_timing_ptr
    4810             : #define __pyx_n_s_timing_view __pyx_mstate_global->__pyx_n_s_timing_view
    4811             : #define __pyx_n_s_tol_a_b __pyx_mstate_global->__pyx_n_s_tol_a_b
    4812             : #define __pyx_n_s_tol_a_i __pyx_mstate_global->__pyx_n_s_tol_a_i
    4813             : #define __pyx_n_s_tol_r_b __pyx_mstate_global->__pyx_n_s_tol_r_b
    4814             : #define __pyx_n_s_tol_r_i __pyx_mstate_global->__pyx_n_s_tol_r_i
    4815             : #define __pyx_n_s_tol_rel_b __pyx_mstate_global->__pyx_n_s_tol_rel_b
    4816             : #define __pyx_n_s_tol_rel_i __pyx_mstate_global->__pyx_n_s_tol_rel_i
    4817             : #define __pyx_n_s_trust_radius __pyx_mstate_global->__pyx_n_s_trust_radius
    4818             : #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
    4819             : #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
    4820             : #define __pyx_n_s_unicode __pyx_mstate_global->__pyx_n_s_unicode
    4821             : #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
    4822             : #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
    4823             : #define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v
    4824             : #define __pyx_n_s_v_dot_g __pyx_mstate_global->__pyx_n_s_v_dot_g
    4825             : #define __pyx_n_s_verbose __pyx_mstate_global->__pyx_n_s_verbose
    4826             : #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
    4827             : #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
    4828             : #define __pyx_n_s_zero __pyx_mstate_global->__pyx_n_s_zero
    4829             : #define __pyx_n_s_zeros __pyx_mstate_global->__pyx_n_s_zeros
    4830             : #define __pyx_float__5 __pyx_mstate_global->__pyx_float__5
    4831             : #define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0
    4832             : #define __pyx_float_1e9 __pyx_mstate_global->__pyx_float_1e9
    4833             : #define __pyx_float_neg_2_0 __pyx_mstate_global->__pyx_float_neg_2_0
    4834             : #define __pyx_float_neg_3_0 __pyx_mstate_global->__pyx_float_neg_3_0
    4835             : #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
    4836             : #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
    4837             : #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
    4838             : #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
    4839             : #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
    4840             : #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
    4841             : #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
    4842             : #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
    4843             : #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5
    4844             : #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
    4845             : #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
    4846             : #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
    4847             : #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
    4848             : #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
    4849             : #define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
    4850             : #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
    4851             : #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
    4852             : #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
    4853             : #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
    4854             : #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
    4855             : #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
    4856             : #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
    4857             : #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
    4858             : #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
    4859             : #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
    4860             : #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
    4861             : #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
    4862             : #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
    4863             : #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
    4864             : #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
    4865             : #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
    4866             : /* #### Code section: module_code ### */
    4867             : 
    4868             : /* "View.MemoryView":131
    4869             :  *         cdef bint dtype_is_object
    4870             :  * 
    4871             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    4872             :  *                   mode="c", bint allocate_buffer=True):
    4873             :  * 
    4874             :  */
    4875             : 
    4876             : /* Python wrapper */
    4877             : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    4878           0 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    4879           0 :   PyObject *__pyx_v_shape = 0;
    4880           0 :   Py_ssize_t __pyx_v_itemsize;
    4881           0 :   PyObject *__pyx_v_format = 0;
    4882           0 :   PyObject *__pyx_v_mode = 0;
    4883           0 :   int __pyx_v_allocate_buffer;
    4884           0 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    4885           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    4886           0 :   PyObject* values[5] = {0,0,0,0,0};
    4887           0 :   int __pyx_lineno = 0;
    4888           0 :   const char *__pyx_filename = NULL;
    4889           0 :   int __pyx_clineno = 0;
    4890           0 :   int __pyx_r;
    4891             :   __Pyx_RefNannyDeclarations
    4892           0 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    4893             :   #if CYTHON_ASSUME_SAFE_MACROS
    4894           0 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    4895             :   #else
    4896             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    4897             :   #endif
    4898           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    4899             :   {
    4900           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    4901           0 :     values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
    4902           0 :     if (__pyx_kwds) {
    4903           0 :       Py_ssize_t kw_args;
    4904           0 :       switch (__pyx_nargs) {
    4905           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4906           0 :         CYTHON_FALLTHROUGH;
    4907           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4908           0 :         CYTHON_FALLTHROUGH;
    4909           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4910           0 :         CYTHON_FALLTHROUGH;
    4911           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4912           0 :         CYTHON_FALLTHROUGH;
    4913           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4914           0 :         CYTHON_FALLTHROUGH;
    4915           0 :         case  0: break;
    4916           0 :         default: goto __pyx_L5_argtuple_error;
    4917             :       }
    4918           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    4919           0 :       switch (__pyx_nargs) {
    4920           0 :         case  0:
    4921           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
    4922           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    4923           0 :           kw_args--;
    4924             :         }
    4925           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4926           0 :         else goto __pyx_L5_argtuple_error;
    4927           0 :         CYTHON_FALLTHROUGH;
    4928             :         case  1:
    4929           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
    4930           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    4931           0 :           kw_args--;
    4932             :         }
    4933           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4934             :         else {
    4935           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
    4936             :         }
    4937           0 :         CYTHON_FALLTHROUGH;
    4938             :         case  2:
    4939           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
    4940           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
    4941           0 :           kw_args--;
    4942             :         }
    4943           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4944             :         else {
    4945           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
    4946             :         }
    4947           0 :         CYTHON_FALLTHROUGH;
    4948             :         case  3:
    4949           0 :         if (kw_args > 0) {
    4950           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
    4951           0 :           if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4952           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4953             :         }
    4954           0 :         CYTHON_FALLTHROUGH;
    4955             :         case  4:
    4956           0 :         if (kw_args > 0) {
    4957           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
    4958           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4959           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4960             :         }
    4961             :       }
    4962           0 :       if (unlikely(kw_args > 0)) {
    4963           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    4964           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
    4965             :       }
    4966             :     } else {
    4967           0 :       switch (__pyx_nargs) {
    4968           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4969           0 :         CYTHON_FALLTHROUGH;
    4970           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4971           0 :         CYTHON_FALLTHROUGH;
    4972           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4973           0 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4974           0 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4975           0 :         break;
    4976           0 :         default: goto __pyx_L5_argtuple_error;
    4977             :       }
    4978             :     }
    4979           0 :     __pyx_v_shape = ((PyObject*)values[0]);
    4980           0 :     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4981           0 :     __pyx_v_format = values[2];
    4982           0 :     __pyx_v_mode = values[3];
    4983           0 :     if (values[4]) {
    4984           0 :       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
    4985             :     } else {
    4986             : 
    4987             :       /* "View.MemoryView":132
    4988             :  * 
    4989             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
    4990             :  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
    4991             :  * 
    4992             :  *         cdef int idx
    4993             :  */
    4994             :       __pyx_v_allocate_buffer = ((int)1);
    4995             :     }
    4996             :   }
    4997           0 :   goto __pyx_L6_skip;
    4998           0 :   __pyx_L5_argtuple_error:;
    4999           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
    5000           0 :   __pyx_L6_skip:;
    5001           0 :   goto __pyx_L4_argument_unpacking_done;
    5002           0 :   __pyx_L3_error:;
    5003             :   {
    5004           0 :     Py_ssize_t __pyx_temp;
    5005           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    5006             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    5007             :     }
    5008             :   }
    5009           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5010           0 :   __Pyx_RefNannyFinishContext();
    5011           0 :   return -1;
    5012           0 :   __pyx_L4_argument_unpacking_done:;
    5013           0 :   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
    5014           0 :   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    5015           0 :     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
    5016             :   }
    5017           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
    5018             : 
    5019             :   /* "View.MemoryView":131
    5020             :  *         cdef bint dtype_is_object
    5021             :  * 
    5022             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5023             :  *                   mode="c", bint allocate_buffer=True):
    5024             :  * 
    5025             :  */
    5026             : 
    5027             :   /* function exit code */
    5028           0 :   goto __pyx_L0;
    5029             :   __pyx_L1_error:;
    5030             :   __pyx_r = -1;
    5031           0 :   __pyx_L0:;
    5032             :   {
    5033           0 :     Py_ssize_t __pyx_temp;
    5034           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    5035             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    5036             :     }
    5037             :   }
    5038             :   __Pyx_RefNannyFinishContext();
    5039             :   return __pyx_r;
    5040             : }
    5041             : 
    5042           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
    5043           0 :   int __pyx_v_idx;
    5044           0 :   Py_ssize_t __pyx_v_dim;
    5045           0 :   char __pyx_v_order;
    5046           0 :   int __pyx_r;
    5047             :   __Pyx_RefNannyDeclarations
    5048           0 :   Py_ssize_t __pyx_t_1;
    5049           0 :   int __pyx_t_2;
    5050           0 :   int __pyx_t_3;
    5051           0 :   PyObject *__pyx_t_4 = NULL;
    5052           0 :   PyObject *__pyx_t_5 = NULL;
    5053           0 :   PyObject *__pyx_t_6 = NULL;
    5054           0 :   unsigned int __pyx_t_7;
    5055           0 :   char *__pyx_t_8;
    5056           0 :   int __pyx_t_9;
    5057           0 :   Py_ssize_t __pyx_t_10;
    5058           0 :   Py_UCS4 __pyx_t_11;
    5059           0 :   int __pyx_lineno = 0;
    5060           0 :   const char *__pyx_filename = NULL;
    5061           0 :   int __pyx_clineno = 0;
    5062           0 :   __Pyx_RefNannySetupContext("__cinit__", 0);
    5063           0 :   __Pyx_INCREF(__pyx_v_format);
    5064             : 
    5065             :   /* "View.MemoryView":137
    5066             :  *         cdef Py_ssize_t dim
    5067             :  * 
    5068             :  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
    5069             :  *         self.itemsize = itemsize
    5070             :  * 
    5071             :  */
    5072           0 :   if (unlikely(__pyx_v_shape == Py_None)) {
    5073           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    5074           0 :     __PYX_ERR(1, 137, __pyx_L1_error)
    5075             :   }
    5076           0 :   __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
    5077           0 :   __pyx_v_self->ndim = ((int)__pyx_t_1);
    5078             : 
    5079             :   /* "View.MemoryView":138
    5080             :  * 
    5081             :  *         self.ndim = <int> len(shape)
    5082             :  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
    5083             :  * 
    5084             :  *         if not self.ndim:
    5085             :  */
    5086           0 :   __pyx_v_self->itemsize = __pyx_v_itemsize;
    5087             : 
    5088             :   /* "View.MemoryView":140
    5089             :  *         self.itemsize = itemsize
    5090             :  * 
    5091             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    5092             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5093             :  * 
    5094             :  */
    5095           0 :   __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
    5096           0 :   if (unlikely(__pyx_t_2)) {
    5097             : 
    5098             :     /* "View.MemoryView":141
    5099             :  * 
    5100             :  *         if not self.ndim:
    5101             :  *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
    5102             :  * 
    5103             :  *         if itemsize <= 0:
    5104             :  */
    5105           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
    5106           0 :     __PYX_ERR(1, 141, __pyx_L1_error)
    5107             : 
    5108             :     /* "View.MemoryView":140
    5109             :  *         self.itemsize = itemsize
    5110             :  * 
    5111             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    5112             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5113             :  * 
    5114             :  */
    5115             :   }
    5116             : 
    5117             :   /* "View.MemoryView":143
    5118             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5119             :  * 
    5120             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    5121             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5122             :  * 
    5123             :  */
    5124           0 :   __pyx_t_2 = (__pyx_v_itemsize <= 0);
    5125           0 :   if (unlikely(__pyx_t_2)) {
    5126             : 
    5127             :     /* "View.MemoryView":144
    5128             :  * 
    5129             :  *         if itemsize <= 0:
    5130             :  *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
    5131             :  * 
    5132             :  *         if not isinstance(format, bytes):
    5133             :  */
    5134           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
    5135           0 :     __PYX_ERR(1, 144, __pyx_L1_error)
    5136             : 
    5137             :     /* "View.MemoryView":143
    5138             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5139             :  * 
    5140             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    5141             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5142             :  * 
    5143             :  */
    5144             :   }
    5145             : 
    5146             :   /* "View.MemoryView":146
    5147             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5148             :  * 
    5149             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    5150             :  *             format = format.encode('ASCII')
    5151             :  *         self._format = format  # keep a reference to the byte string
    5152             :  */
    5153           0 :   __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
    5154           0 :   __pyx_t_3 = (!__pyx_t_2);
    5155           0 :   if (__pyx_t_3) {
    5156             : 
    5157             :     /* "View.MemoryView":147
    5158             :  * 
    5159             :  *         if not isinstance(format, bytes):
    5160             :  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
    5161             :  *         self._format = format  # keep a reference to the byte string
    5162             :  *         self.format = self._format
    5163             :  */
    5164           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
    5165           0 :     __Pyx_GOTREF(__pyx_t_5);
    5166           0 :     __pyx_t_6 = NULL;
    5167           0 :     __pyx_t_7 = 0;
    5168             :     #if CYTHON_UNPACK_METHODS
    5169           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    5170           0 :       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    5171           0 :       if (likely(__pyx_t_6)) {
    5172           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    5173           0 :         __Pyx_INCREF(__pyx_t_6);
    5174           0 :         __Pyx_INCREF(function);
    5175           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    5176             :         __pyx_t_7 = 1;
    5177             :       }
    5178             :     }
    5179             :     #endif
    5180             :     {
    5181           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
    5182           0 :       __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    5183           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    5184           0 :       if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
    5185           0 :       __Pyx_GOTREF(__pyx_t_4);
    5186           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5187             :     }
    5188           0 :     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    5189             :     __pyx_t_4 = 0;
    5190             : 
    5191             :     /* "View.MemoryView":146
    5192             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5193             :  * 
    5194             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    5195             :  *             format = format.encode('ASCII')
    5196             :  *         self._format = format  # keep a reference to the byte string
    5197             :  */
    5198             :   }
    5199             : 
    5200             :   /* "View.MemoryView":148
    5201             :  *         if not isinstance(format, bytes):
    5202             :  *             format = format.encode('ASCII')
    5203             :  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
    5204             :  *         self.format = self._format
    5205             :  * 
    5206             :  */
    5207           0 :   if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
    5208           0 :   __pyx_t_4 = __pyx_v_format;
    5209           0 :   __Pyx_INCREF(__pyx_t_4);
    5210           0 :   __Pyx_GIVEREF(__pyx_t_4);
    5211           0 :   __Pyx_GOTREF(__pyx_v_self->_format);
    5212           0 :   __Pyx_DECREF(__pyx_v_self->_format);
    5213           0 :   __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
    5214           0 :   __pyx_t_4 = 0;
    5215             : 
    5216             :   /* "View.MemoryView":149
    5217             :  *             format = format.encode('ASCII')
    5218             :  *         self._format = format  # keep a reference to the byte string
    5219             :  *         self.format = self._format             # <<<<<<<<<<<<<<
    5220             :  * 
    5221             :  * 
    5222             :  */
    5223           0 :   if (unlikely(__pyx_v_self->_format == Py_None)) {
    5224           0 :     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    5225           0 :     __PYX_ERR(1, 149, __pyx_L1_error)
    5226             :   }
    5227           0 :   __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
    5228           0 :   __pyx_v_self->format = __pyx_t_8;
    5229             : 
    5230             :   /* "View.MemoryView":152
    5231             :  * 
    5232             :  * 
    5233             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
    5234             :  *         self._strides = self._shape + self.ndim
    5235             :  * 
    5236             :  */
    5237           0 :   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
    5238             : 
    5239             :   /* "View.MemoryView":153
    5240             :  * 
    5241             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
    5242             :  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
    5243             :  * 
    5244             :  *         if not self._shape:
    5245             :  */
    5246           0 :   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
    5247             : 
    5248             :   /* "View.MemoryView":155
    5249             :  *         self._strides = self._shape + self.ndim
    5250             :  * 
    5251             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5252             :  *             raise MemoryError, "unable to allocate shape and strides."
    5253             :  * 
    5254             :  */
    5255           0 :   __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
    5256           0 :   if (unlikely(__pyx_t_3)) {
    5257             : 
    5258             :     /* "View.MemoryView":156
    5259             :  * 
    5260             :  *         if not self._shape:
    5261             :  *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
    5262             :  * 
    5263             :  * 
    5264             :  */
    5265           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
    5266           0 :     __PYX_ERR(1, 156, __pyx_L1_error)
    5267             : 
    5268             :     /* "View.MemoryView":155
    5269             :  *         self._strides = self._shape + self.ndim
    5270             :  * 
    5271             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5272             :  *             raise MemoryError, "unable to allocate shape and strides."
    5273             :  * 
    5274             :  */
    5275             :   }
    5276             : 
    5277             :   /* "View.MemoryView":159
    5278             :  * 
    5279             :  * 
    5280             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5281             :  *             if dim <= 0:
    5282             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5283             :  */
    5284           0 :   __pyx_t_9 = 0;
    5285           0 :   __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
    5286             :   __pyx_t_1 = 0;
    5287           0 :   for (;;) {
    5288           0 :     {
    5289           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
    5290             :       #if !CYTHON_ASSUME_SAFE_MACROS
    5291             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5292             :       #endif
    5293           0 :       if (__pyx_t_1 >= __pyx_temp) break;
    5294             :     }
    5295             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    5296           0 :     __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5297             :     #else
    5298             :     __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
    5299             :     __Pyx_GOTREF(__pyx_t_5);
    5300             :     #endif
    5301           0 :     __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
    5302           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5303           0 :     __pyx_v_dim = __pyx_t_10;
    5304           0 :     __pyx_v_idx = __pyx_t_9;
    5305           0 :     __pyx_t_9 = (__pyx_t_9 + 1);
    5306             : 
    5307             :     /* "View.MemoryView":160
    5308             :  * 
    5309             :  *         for idx, dim in enumerate(shape):
    5310             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5311             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5312             :  *             self._shape[idx] = dim
    5313             :  */
    5314           0 :     __pyx_t_3 = (__pyx_v_dim <= 0);
    5315           0 :     if (unlikely(__pyx_t_3)) {
    5316             : 
    5317             :       /* "View.MemoryView":161
    5318             :  *         for idx, dim in enumerate(shape):
    5319             :  *             if dim <= 0:
    5320             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
    5321             :  *             self._shape[idx] = dim
    5322             :  * 
    5323             :  */
    5324           0 :       __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
    5325           0 :       __Pyx_GOTREF(__pyx_t_5);
    5326           0 :       __pyx_t_10 = 0;
    5327           0 :       __pyx_t_11 = 127;
    5328           0 :       __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
    5329           0 :       __pyx_t_10 += 22;
    5330           0 :       __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
    5331           0 :       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
    5332           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5333           0 :       __Pyx_GOTREF(__pyx_t_6);
    5334           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5335           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5336           0 :       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    5337           0 :       __pyx_t_6 = 0;
    5338           0 :       __Pyx_INCREF(__pyx_kp_u_);
    5339           0 :       __pyx_t_10 += 2;
    5340           0 :       __Pyx_GIVEREF(__pyx_kp_u_);
    5341           0 :       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_);
    5342           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5343           0 :       __Pyx_GOTREF(__pyx_t_6);
    5344           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5345           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5346           0 :       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
    5347           0 :       __pyx_t_6 = 0;
    5348           0 :       __Pyx_INCREF(__pyx_kp_u__2);
    5349           0 :       __pyx_t_10 += 1;
    5350           0 :       __Pyx_GIVEREF(__pyx_kp_u__2);
    5351           0 :       PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2);
    5352           0 :       __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5353           0 :       __Pyx_GOTREF(__pyx_t_6);
    5354           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5355           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5356           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5357           0 :       __PYX_ERR(1, 161, __pyx_L1_error)
    5358             : 
    5359             :       /* "View.MemoryView":160
    5360             :  * 
    5361             :  *         for idx, dim in enumerate(shape):
    5362             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5363             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5364             :  *             self._shape[idx] = dim
    5365             :  */
    5366             :     }
    5367             : 
    5368             :     /* "View.MemoryView":162
    5369             :  *             if dim <= 0:
    5370             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5371             :  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
    5372             :  * 
    5373             :  *         cdef char order
    5374             :  */
    5375           0 :     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
    5376             : 
    5377             :     /* "View.MemoryView":159
    5378             :  * 
    5379             :  * 
    5380             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5381             :  *             if dim <= 0:
    5382             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5383             :  */
    5384             :   }
    5385           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5386             : 
    5387             :   /* "View.MemoryView":165
    5388             :  * 
    5389             :  *         cdef char order
    5390             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5391             :  *             order = b'C'
    5392             :  *             self.mode = u'c'
    5393             :  */
    5394           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
    5395           0 :   if (__pyx_t_3) {
    5396             : 
    5397             :     /* "View.MemoryView":166
    5398             :  *         cdef char order
    5399             :  *         if mode == 'c':
    5400             :  *             order = b'C'             # <<<<<<<<<<<<<<
    5401             :  *             self.mode = u'c'
    5402             :  *         elif mode == 'fortran':
    5403             :  */
    5404           0 :     __pyx_v_order = 'C';
    5405             : 
    5406             :     /* "View.MemoryView":167
    5407             :  *         if mode == 'c':
    5408             :  *             order = b'C'
    5409             :  *             self.mode = u'c'             # <<<<<<<<<<<<<<
    5410             :  *         elif mode == 'fortran':
    5411             :  *             order = b'F'
    5412             :  */
    5413           0 :     __Pyx_INCREF(__pyx_n_u_c);
    5414           0 :     __Pyx_GIVEREF(__pyx_n_u_c);
    5415           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5416           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5417           0 :     __pyx_v_self->mode = __pyx_n_u_c;
    5418             : 
    5419             :     /* "View.MemoryView":165
    5420             :  * 
    5421             :  *         cdef char order
    5422             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5423             :  *             order = b'C'
    5424             :  *             self.mode = u'c'
    5425             :  */
    5426           0 :     goto __pyx_L11;
    5427             :   }
    5428             : 
    5429             :   /* "View.MemoryView":168
    5430             :  *             order = b'C'
    5431             :  *             self.mode = u'c'
    5432             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5433             :  *             order = b'F'
    5434             :  *             self.mode = u'fortran'
    5435             :  */
    5436           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
    5437           0 :   if (likely(__pyx_t_3)) {
    5438             : 
    5439             :     /* "View.MemoryView":169
    5440             :  *             self.mode = u'c'
    5441             :  *         elif mode == 'fortran':
    5442             :  *             order = b'F'             # <<<<<<<<<<<<<<
    5443             :  *             self.mode = u'fortran'
    5444             :  *         else:
    5445             :  */
    5446           0 :     __pyx_v_order = 'F';
    5447             : 
    5448             :     /* "View.MemoryView":170
    5449             :  *         elif mode == 'fortran':
    5450             :  *             order = b'F'
    5451             :  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
    5452             :  *         else:
    5453             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5454             :  */
    5455           0 :     __Pyx_INCREF(__pyx_n_u_fortran);
    5456           0 :     __Pyx_GIVEREF(__pyx_n_u_fortran);
    5457           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5458           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5459           0 :     __pyx_v_self->mode = __pyx_n_u_fortran;
    5460             : 
    5461             :     /* "View.MemoryView":168
    5462             :  *             order = b'C'
    5463             :  *             self.mode = u'c'
    5464             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5465             :  *             order = b'F'
    5466             :  *             self.mode = u'fortran'
    5467             :  */
    5468           0 :     goto __pyx_L11;
    5469             :   }
    5470             : 
    5471             :   /* "View.MemoryView":172
    5472             :  *             self.mode = u'fortran'
    5473             :  *         else:
    5474             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
    5475             :  * 
    5476             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5477             :  */
    5478             :   /*else*/ {
    5479           0 :     __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
    5480           0 :     __Pyx_GOTREF(__pyx_t_4);
    5481           0 :     __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
    5482           0 :     __Pyx_GOTREF(__pyx_t_6);
    5483           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5484           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5485           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5486           0 :     __PYX_ERR(1, 172, __pyx_L1_error)
    5487             :   }
    5488           0 :   __pyx_L11:;
    5489             : 
    5490             :   /* "View.MemoryView":174
    5491             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5492             :  * 
    5493             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
    5494             :  * 
    5495             :  *         self.free_data = allocate_buffer
    5496             :  */
    5497           0 :   __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
    5498             : 
    5499             :   /* "View.MemoryView":176
    5500             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5501             :  * 
    5502             :  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
    5503             :  *         self.dtype_is_object = format == b'O'
    5504             :  * 
    5505             :  */
    5506           0 :   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
    5507             : 
    5508             :   /* "View.MemoryView":177
    5509             :  * 
    5510             :  *         self.free_data = allocate_buffer
    5511             :  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
    5512             :  * 
    5513             :  *         if allocate_buffer:
    5514             :  */
    5515           0 :   __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
    5516           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
    5517           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5518           0 :   __pyx_v_self->dtype_is_object = __pyx_t_3;
    5519             : 
    5520             :   /* "View.MemoryView":179
    5521             :  *         self.dtype_is_object = format == b'O'
    5522             :  * 
    5523             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5524             :  *             _allocate_buffer(self)
    5525             :  * 
    5526             :  */
    5527           0 :   if (__pyx_v_allocate_buffer) {
    5528             : 
    5529             :     /* "View.MemoryView":180
    5530             :  * 
    5531             :  *         if allocate_buffer:
    5532             :  *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
    5533             :  * 
    5534             :  *     @cname('getbuffer')
    5535             :  */
    5536           0 :     __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)
    5537             : 
    5538             :     /* "View.MemoryView":179
    5539             :  *         self.dtype_is_object = format == b'O'
    5540             :  * 
    5541             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5542             :  *             _allocate_buffer(self)
    5543             :  * 
    5544             :  */
    5545             :   }
    5546             : 
    5547             :   /* "View.MemoryView":131
    5548             :  *         cdef bint dtype_is_object
    5549             :  * 
    5550             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5551             :  *                   mode="c", bint allocate_buffer=True):
    5552             :  * 
    5553             :  */
    5554             : 
    5555             :   /* function exit code */
    5556           0 :   __pyx_r = 0;
    5557           0 :   goto __pyx_L0;
    5558           0 :   __pyx_L1_error:;
    5559           0 :   __Pyx_XDECREF(__pyx_t_4);
    5560           0 :   __Pyx_XDECREF(__pyx_t_5);
    5561           0 :   __Pyx_XDECREF(__pyx_t_6);
    5562           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5563           0 :   __pyx_r = -1;
    5564           0 :   __pyx_L0:;
    5565           0 :   __Pyx_XDECREF(__pyx_v_format);
    5566           0 :   __Pyx_RefNannyFinishContext();
    5567           0 :   return __pyx_r;
    5568             : }
    5569             : 
    5570             : /* "View.MemoryView":182
    5571             :  *             _allocate_buffer(self)
    5572             :  * 
    5573             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5574             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5575             :  *         cdef int bufmode = -1
    5576             :  */
    5577             : 
    5578             : /* Python wrapper */
    5579             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    5580           0 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5581           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5582           0 :   int __pyx_r;
    5583             :   __Pyx_RefNannyDeclarations
    5584           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    5585           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5586           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    5587             : 
    5588             :   /* function exit code */
    5589           0 :   __Pyx_RefNannyFinishContext();
    5590           0 :   return __pyx_r;
    5591             : }
    5592             : 
    5593           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5594           0 :   int __pyx_v_bufmode;
    5595           0 :   int __pyx_r;
    5596             :   __Pyx_RefNannyDeclarations
    5597           0 :   int __pyx_t_1;
    5598           0 :   char *__pyx_t_2;
    5599           0 :   Py_ssize_t __pyx_t_3;
    5600           0 :   int __pyx_t_4;
    5601           0 :   Py_ssize_t *__pyx_t_5;
    5602           0 :   int __pyx_lineno = 0;
    5603           0 :   const char *__pyx_filename = NULL;
    5604           0 :   int __pyx_clineno = 0;
    5605           0 :   if (unlikely(__pyx_v_info == NULL)) {
    5606           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    5607           0 :     return -1;
    5608             :   }
    5609           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    5610           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    5611           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    5612             : 
    5613             :   /* "View.MemoryView":184
    5614             :  *     @cname('getbuffer')
    5615             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5616             :  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
    5617             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5618             :  *             if self.mode == u"c":
    5619             :  */
    5620           0 :   __pyx_v_bufmode = -1;
    5621             : 
    5622             :   /* "View.MemoryView":185
    5623             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5624             :  *         cdef int bufmode = -1
    5625             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5626             :  *             if self.mode == u"c":
    5627             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5628             :  */
    5629           0 :   __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
    5630           0 :   if (__pyx_t_1) {
    5631             : 
    5632             :     /* "View.MemoryView":186
    5633             :  *         cdef int bufmode = -1
    5634             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5635             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5636             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5637             :  *             elif self.mode == u"fortran":
    5638             :  */
    5639           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    5640           0 :     if (__pyx_t_1) {
    5641             : 
    5642             :       /* "View.MemoryView":187
    5643             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5644             :  *             if self.mode == u"c":
    5645             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5646             :  *             elif self.mode == u"fortran":
    5647             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5648             :  */
    5649           0 :       __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5650             : 
    5651             :       /* "View.MemoryView":186
    5652             :  *         cdef int bufmode = -1
    5653             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5654             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5655             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5656             :  *             elif self.mode == u"fortran":
    5657             :  */
    5658           0 :       goto __pyx_L4;
    5659             :     }
    5660             : 
    5661             :     /* "View.MemoryView":188
    5662             :  *             if self.mode == u"c":
    5663             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5664             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5665             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5666             :  *             if not (flags & bufmode):
    5667             :  */
    5668           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    5669           0 :     if (__pyx_t_1) {
    5670             : 
    5671             :       /* "View.MemoryView":189
    5672             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5673             :  *             elif self.mode == u"fortran":
    5674             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5675             :  *             if not (flags & bufmode):
    5676             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5677             :  */
    5678           0 :       __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5679             : 
    5680             :       /* "View.MemoryView":188
    5681             :  *             if self.mode == u"c":
    5682             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5683             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5684             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5685             :  *             if not (flags & bufmode):
    5686             :  */
    5687             :     }
    5688           0 :     __pyx_L4:;
    5689             : 
    5690             :     /* "View.MemoryView":190
    5691             :  *             elif self.mode == u"fortran":
    5692             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5693             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5694             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5695             :  *         info.buf = self.data
    5696             :  */
    5697           0 :     __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    5698           0 :     if (unlikely(__pyx_t_1)) {
    5699             : 
    5700             :       /* "View.MemoryView":191
    5701             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5702             :  *             if not (flags & bufmode):
    5703             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
    5704             :  *         info.buf = self.data
    5705             :  *         info.len = self.len
    5706             :  */
    5707           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
    5708           0 :       __PYX_ERR(1, 191, __pyx_L1_error)
    5709             : 
    5710             :       /* "View.MemoryView":190
    5711             :  *             elif self.mode == u"fortran":
    5712             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5713             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5714             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5715             :  *         info.buf = self.data
    5716             :  */
    5717             :     }
    5718             : 
    5719             :     /* "View.MemoryView":185
    5720             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5721             :  *         cdef int bufmode = -1
    5722             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5723             :  *             if self.mode == u"c":
    5724             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5725             :  */
    5726             :   }
    5727             : 
    5728             :   /* "View.MemoryView":192
    5729             :  *             if not (flags & bufmode):
    5730             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5731             :  *         info.buf = self.data             # <<<<<<<<<<<<<<
    5732             :  *         info.len = self.len
    5733             :  * 
    5734             :  */
    5735           0 :   __pyx_t_2 = __pyx_v_self->data;
    5736           0 :   __pyx_v_info->buf = __pyx_t_2;
    5737             : 
    5738             :   /* "View.MemoryView":193
    5739             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5740             :  *         info.buf = self.data
    5741             :  *         info.len = self.len             # <<<<<<<<<<<<<<
    5742             :  * 
    5743             :  *         if flags & PyBUF_STRIDES:
    5744             :  */
    5745           0 :   __pyx_t_3 = __pyx_v_self->len;
    5746           0 :   __pyx_v_info->len = __pyx_t_3;
    5747             : 
    5748             :   /* "View.MemoryView":195
    5749             :  *         info.len = self.len
    5750             :  * 
    5751             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5752             :  *             info.ndim = self.ndim
    5753             :  *             info.shape = self._shape
    5754             :  */
    5755           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    5756           0 :   if (__pyx_t_1) {
    5757             : 
    5758             :     /* "View.MemoryView":196
    5759             :  * 
    5760             :  *         if flags & PyBUF_STRIDES:
    5761             :  *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
    5762             :  *             info.shape = self._shape
    5763             :  *             info.strides = self._strides
    5764             :  */
    5765           0 :     __pyx_t_4 = __pyx_v_self->ndim;
    5766           0 :     __pyx_v_info->ndim = __pyx_t_4;
    5767             : 
    5768             :     /* "View.MemoryView":197
    5769             :  *         if flags & PyBUF_STRIDES:
    5770             :  *             info.ndim = self.ndim
    5771             :  *             info.shape = self._shape             # <<<<<<<<<<<<<<
    5772             :  *             info.strides = self._strides
    5773             :  *         else:
    5774             :  */
    5775           0 :     __pyx_t_5 = __pyx_v_self->_shape;
    5776           0 :     __pyx_v_info->shape = __pyx_t_5;
    5777             : 
    5778             :     /* "View.MemoryView":198
    5779             :  *             info.ndim = self.ndim
    5780             :  *             info.shape = self._shape
    5781             :  *             info.strides = self._strides             # <<<<<<<<<<<<<<
    5782             :  *         else:
    5783             :  *             info.ndim = 1
    5784             :  */
    5785           0 :     __pyx_t_5 = __pyx_v_self->_strides;
    5786           0 :     __pyx_v_info->strides = __pyx_t_5;
    5787             : 
    5788             :     /* "View.MemoryView":195
    5789             :  *         info.len = self.len
    5790             :  * 
    5791             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5792             :  *             info.ndim = self.ndim
    5793             :  *             info.shape = self._shape
    5794             :  */
    5795           0 :     goto __pyx_L6;
    5796             :   }
    5797             : 
    5798             :   /* "View.MemoryView":200
    5799             :  *             info.strides = self._strides
    5800             :  *         else:
    5801             :  *             info.ndim = 1             # <<<<<<<<<<<<<<
    5802             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5803             :  *             info.strides = NULL
    5804             :  */
    5805             :   /*else*/ {
    5806           0 :     __pyx_v_info->ndim = 1;
    5807             : 
    5808             :     /* "View.MemoryView":201
    5809             :  *         else:
    5810             :  *             info.ndim = 1
    5811             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
    5812             :  *             info.strides = NULL
    5813             :  * 
    5814             :  */
    5815           0 :     __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    5816           0 :     if (__pyx_t_1) {
    5817             :       __pyx_t_5 = (&__pyx_v_self->len);
    5818             :     } else {
    5819             :       __pyx_t_5 = NULL;
    5820             :     }
    5821           0 :     __pyx_v_info->shape = __pyx_t_5;
    5822             : 
    5823             :     /* "View.MemoryView":202
    5824             :  *             info.ndim = 1
    5825             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5826             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    5827             :  * 
    5828             :  *         info.suboffsets = NULL
    5829             :  */
    5830           0 :     __pyx_v_info->strides = NULL;
    5831             :   }
    5832           0 :   __pyx_L6:;
    5833             : 
    5834             :   /* "View.MemoryView":204
    5835             :  *             info.strides = NULL
    5836             :  * 
    5837             :  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
    5838             :  *         info.itemsize = self.itemsize
    5839             :  *         info.readonly = 0
    5840             :  */
    5841           0 :   __pyx_v_info->suboffsets = NULL;
    5842             : 
    5843             :   /* "View.MemoryView":205
    5844             :  * 
    5845             :  *         info.suboffsets = NULL
    5846             :  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
    5847             :  *         info.readonly = 0
    5848             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5849             :  */
    5850           0 :   __pyx_t_3 = __pyx_v_self->itemsize;
    5851           0 :   __pyx_v_info->itemsize = __pyx_t_3;
    5852             : 
    5853             :   /* "View.MemoryView":206
    5854             :  *         info.suboffsets = NULL
    5855             :  *         info.itemsize = self.itemsize
    5856             :  *         info.readonly = 0             # <<<<<<<<<<<<<<
    5857             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5858             :  *         info.obj = self
    5859             :  */
    5860           0 :   __pyx_v_info->readonly = 0;
    5861             : 
    5862             :   /* "View.MemoryView":207
    5863             :  *         info.itemsize = self.itemsize
    5864             :  *         info.readonly = 0
    5865             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
    5866             :  *         info.obj = self
    5867             :  * 
    5868             :  */
    5869           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    5870           0 :   if (__pyx_t_1) {
    5871           0 :     __pyx_t_2 = __pyx_v_self->format;
    5872             :   } else {
    5873             :     __pyx_t_2 = NULL;
    5874             :   }
    5875           0 :   __pyx_v_info->format = __pyx_t_2;
    5876             : 
    5877             :   /* "View.MemoryView":208
    5878             :  *         info.readonly = 0
    5879             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5880             :  *         info.obj = self             # <<<<<<<<<<<<<<
    5881             :  * 
    5882             :  *     def __dealloc__(array self):
    5883             :  */
    5884           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    5885           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    5886           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
    5887           0 :   __Pyx_DECREF(__pyx_v_info->obj);
    5888           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
    5889             : 
    5890             :   /* "View.MemoryView":182
    5891             :  *             _allocate_buffer(self)
    5892             :  * 
    5893             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5894             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5895             :  *         cdef int bufmode = -1
    5896             :  */
    5897             : 
    5898             :   /* function exit code */
    5899           0 :   __pyx_r = 0;
    5900           0 :   goto __pyx_L0;
    5901           0 :   __pyx_L1_error:;
    5902           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5903           0 :   __pyx_r = -1;
    5904           0 :   if (__pyx_v_info->obj != NULL) {
    5905           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5906           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5907             :   }
    5908           0 :   goto __pyx_L2;
    5909           0 :   __pyx_L0:;
    5910           0 :   if (__pyx_v_info->obj == Py_None) {
    5911           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5912           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5913             :   }
    5914           0 :   __pyx_L2:;
    5915             :   __Pyx_RefNannyFinishContext();
    5916             :   return __pyx_r;
    5917             : }
    5918             : 
    5919             : /* "View.MemoryView":210
    5920             :  *         info.obj = self
    5921             :  * 
    5922             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    5923             :  *         if self.callback_free_data != NULL:
    5924             :  *             self.callback_free_data(self.data)
    5925             :  */
    5926             : 
    5927             : /* Python wrapper */
    5928             : static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
    5929           0 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
    5930           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5931             :   __Pyx_RefNannyDeclarations
    5932           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    5933           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5934           0 :   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
    5935             : 
    5936             :   /* function exit code */
    5937           0 :   __Pyx_RefNannyFinishContext();
    5938             : }
    5939             : 
    5940           0 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
    5941           0 :   int __pyx_t_1;
    5942           0 :   int __pyx_t_2;
    5943             : 
    5944             :   /* "View.MemoryView":211
    5945             :  * 
    5946             :  *     def __dealloc__(array self):
    5947             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5948             :  *             self.callback_free_data(self.data)
    5949             :  *         elif self.free_data and self.data is not NULL:
    5950             :  */
    5951           0 :   __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
    5952           0 :   if (__pyx_t_1) {
    5953             : 
    5954             :     /* "View.MemoryView":212
    5955             :  *     def __dealloc__(array self):
    5956             :  *         if self.callback_free_data != NULL:
    5957             :  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
    5958             :  *         elif self.free_data and self.data is not NULL:
    5959             :  *             if self.dtype_is_object:
    5960             :  */
    5961           0 :     __pyx_v_self->callback_free_data(__pyx_v_self->data);
    5962             : 
    5963             :     /* "View.MemoryView":211
    5964             :  * 
    5965             :  *     def __dealloc__(array self):
    5966             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5967             :  *             self.callback_free_data(self.data)
    5968             :  *         elif self.free_data and self.data is not NULL:
    5969             :  */
    5970           0 :     goto __pyx_L3;
    5971             :   }
    5972             : 
    5973             :   /* "View.MemoryView":213
    5974             :  *         if self.callback_free_data != NULL:
    5975             :  *             self.callback_free_data(self.data)
    5976             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    5977             :  *             if self.dtype_is_object:
    5978             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5979             :  */
    5980           0 :   if (__pyx_v_self->free_data) {
    5981           0 :   } else {
    5982           0 :     __pyx_t_1 = __pyx_v_self->free_data;
    5983           0 :     goto __pyx_L4_bool_binop_done;
    5984             :   }
    5985           0 :   __pyx_t_2 = (__pyx_v_self->data != NULL);
    5986           0 :   __pyx_t_1 = __pyx_t_2;
    5987           0 :   __pyx_L4_bool_binop_done:;
    5988           0 :   if (__pyx_t_1) {
    5989             : 
    5990             :     /* "View.MemoryView":214
    5991             :  *             self.callback_free_data(self.data)
    5992             :  *         elif self.free_data and self.data is not NULL:
    5993             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    5994             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5995             :  *             free(self.data)
    5996             :  */
    5997           0 :     if (__pyx_v_self->dtype_is_object) {
    5998             : 
    5999             :       /* "View.MemoryView":215
    6000             :  *         elif self.free_data and self.data is not NULL:
    6001             :  *             if self.dtype_is_object:
    6002             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
    6003             :  *             free(self.data)
    6004             :  *         PyObject_Free(self._shape)
    6005             :  */
    6006           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
    6007             : 
    6008             :       /* "View.MemoryView":214
    6009             :  *             self.callback_free_data(self.data)
    6010             :  *         elif self.free_data and self.data is not NULL:
    6011             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6012             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6013             :  *             free(self.data)
    6014             :  */
    6015             :     }
    6016             : 
    6017             :     /* "View.MemoryView":216
    6018             :  *             if self.dtype_is_object:
    6019             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6020             :  *             free(self.data)             # <<<<<<<<<<<<<<
    6021             :  *         PyObject_Free(self._shape)
    6022             :  * 
    6023             :  */
    6024           0 :     free(__pyx_v_self->data);
    6025             : 
    6026             :     /* "View.MemoryView":213
    6027             :  *         if self.callback_free_data != NULL:
    6028             :  *             self.callback_free_data(self.data)
    6029             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    6030             :  *             if self.dtype_is_object:
    6031             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6032             :  */
    6033             :   }
    6034           0 :   __pyx_L3:;
    6035             : 
    6036             :   /* "View.MemoryView":217
    6037             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6038             :  *             free(self.data)
    6039             :  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
    6040             :  * 
    6041             :  *     @property
    6042             :  */
    6043           0 :   PyObject_Free(__pyx_v_self->_shape);
    6044             : 
    6045             :   /* "View.MemoryView":210
    6046             :  *         info.obj = self
    6047             :  * 
    6048             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    6049             :  *         if self.callback_free_data != NULL:
    6050             :  *             self.callback_free_data(self.data)
    6051             :  */
    6052             : 
    6053             :   /* function exit code */
    6054           0 : }
    6055             : 
    6056             : /* "View.MemoryView":219
    6057             :  *         PyObject_Free(self._shape)
    6058             :  * 
    6059             :  *     @property             # <<<<<<<<<<<<<<
    6060             :  *     def memview(self):
    6061             :  *         return self.get_memview()
    6062             :  */
    6063             : 
    6064             : /* Python wrapper */
    6065             : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
    6066           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
    6067           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6068           0 :   PyObject *__pyx_r = 0;
    6069             :   __Pyx_RefNannyDeclarations
    6070           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
    6071           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6072           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
    6073             : 
    6074             :   /* function exit code */
    6075           0 :   __Pyx_RefNannyFinishContext();
    6076           0 :   return __pyx_r;
    6077             : }
    6078             : 
    6079           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
    6080           0 :   PyObject *__pyx_r = NULL;
    6081             :   __Pyx_RefNannyDeclarations
    6082           0 :   PyObject *__pyx_t_1 = NULL;
    6083           0 :   int __pyx_lineno = 0;
    6084           0 :   const char *__pyx_filename = NULL;
    6085           0 :   int __pyx_clineno = 0;
    6086           0 :   __Pyx_RefNannySetupContext("__get__", 1);
    6087             : 
    6088             :   /* "View.MemoryView":221
    6089             :  *     @property
    6090             :  *     def memview(self):
    6091             :  *         return self.get_memview()             # <<<<<<<<<<<<<<
    6092             :  * 
    6093             :  *     @cname('get_memview')
    6094             :  */
    6095           0 :   __Pyx_XDECREF(__pyx_r);
    6096           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
    6097           0 :   __Pyx_GOTREF(__pyx_t_1);
    6098           0 :   __pyx_r = __pyx_t_1;
    6099           0 :   __pyx_t_1 = 0;
    6100           0 :   goto __pyx_L0;
    6101             : 
    6102             :   /* "View.MemoryView":219
    6103             :  *         PyObject_Free(self._shape)
    6104             :  * 
    6105             :  *     @property             # <<<<<<<<<<<<<<
    6106             :  *     def memview(self):
    6107             :  *         return self.get_memview()
    6108             :  */
    6109             : 
    6110             :   /* function exit code */
    6111           0 :   __pyx_L1_error:;
    6112           0 :   __Pyx_XDECREF(__pyx_t_1);
    6113           0 :   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6114           0 :   __pyx_r = NULL;
    6115           0 :   __pyx_L0:;
    6116           0 :   __Pyx_XGIVEREF(__pyx_r);
    6117           0 :   __Pyx_RefNannyFinishContext();
    6118           0 :   return __pyx_r;
    6119             : }
    6120             : 
    6121             : /* "View.MemoryView":224
    6122             :  * 
    6123             :  *     @cname('get_memview')
    6124             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    6125             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6126             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6127             :  */
    6128             : 
    6129           0 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
    6130           0 :   int __pyx_v_flags;
    6131           0 :   PyObject *__pyx_r = NULL;
    6132             :   __Pyx_RefNannyDeclarations
    6133           0 :   PyObject *__pyx_t_1 = NULL;
    6134           0 :   PyObject *__pyx_t_2 = NULL;
    6135           0 :   PyObject *__pyx_t_3 = NULL;
    6136           0 :   int __pyx_lineno = 0;
    6137           0 :   const char *__pyx_filename = NULL;
    6138           0 :   int __pyx_clineno = 0;
    6139           0 :   __Pyx_RefNannySetupContext("get_memview", 1);
    6140             : 
    6141             :   /* "View.MemoryView":225
    6142             :  *     @cname('get_memview')
    6143             :  *     cdef get_memview(self):
    6144             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
    6145             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6146             :  * 
    6147             :  */
    6148           0 :   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
    6149             : 
    6150             :   /* "View.MemoryView":226
    6151             :  *     cdef get_memview(self):
    6152             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6153             :  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
    6154             :  * 
    6155             :  *     def __len__(self):
    6156             :  */
    6157           0 :   __Pyx_XDECREF(__pyx_r);
    6158           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
    6159           0 :   __Pyx_GOTREF(__pyx_t_1);
    6160           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    6161           0 :   __Pyx_GOTREF(__pyx_t_2);
    6162           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
    6163           0 :   __Pyx_GOTREF(__pyx_t_3);
    6164           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    6165           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    6166           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
    6167           0 :   __Pyx_GIVEREF(__pyx_t_1);
    6168           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
    6169           0 :   __Pyx_GIVEREF(__pyx_t_2);
    6170           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
    6171           0 :   __pyx_t_1 = 0;
    6172           0 :   __pyx_t_2 = 0;
    6173           0 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    6174           0 :   __Pyx_GOTREF(__pyx_t_2);
    6175           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    6176           0 :   __pyx_r = __pyx_t_2;
    6177           0 :   __pyx_t_2 = 0;
    6178           0 :   goto __pyx_L0;
    6179             : 
    6180             :   /* "View.MemoryView":224
    6181             :  * 
    6182             :  *     @cname('get_memview')
    6183             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    6184             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6185             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6186             :  */
    6187             : 
    6188             :   /* function exit code */
    6189           0 :   __pyx_L1_error:;
    6190           0 :   __Pyx_XDECREF(__pyx_t_1);
    6191           0 :   __Pyx_XDECREF(__pyx_t_2);
    6192           0 :   __Pyx_XDECREF(__pyx_t_3);
    6193           0 :   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6194           0 :   __pyx_r = 0;
    6195           0 :   __pyx_L0:;
    6196           0 :   __Pyx_XGIVEREF(__pyx_r);
    6197           0 :   __Pyx_RefNannyFinishContext();
    6198           0 :   return __pyx_r;
    6199             : }
    6200             : 
    6201             : /* "View.MemoryView":228
    6202             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6203             :  * 
    6204             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6205             :  *         return self._shape[0]
    6206             :  * 
    6207             :  */
    6208             : 
    6209             : /* Python wrapper */
    6210             : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
    6211           0 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
    6212           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6213           0 :   Py_ssize_t __pyx_r;
    6214             :   __Pyx_RefNannyDeclarations
    6215           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
    6216           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6217           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
    6218             : 
    6219             :   /* function exit code */
    6220           0 :   __Pyx_RefNannyFinishContext();
    6221           0 :   return __pyx_r;
    6222             : }
    6223             : 
    6224           0 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
    6225           0 :   Py_ssize_t __pyx_r;
    6226             : 
    6227             :   /* "View.MemoryView":229
    6228             :  * 
    6229             :  *     def __len__(self):
    6230             :  *         return self._shape[0]             # <<<<<<<<<<<<<<
    6231             :  * 
    6232             :  *     def __getattr__(self, attr):
    6233             :  */
    6234           0 :   __pyx_r = (__pyx_v_self->_shape[0]);
    6235           0 :   goto __pyx_L0;
    6236             : 
    6237             :   /* "View.MemoryView":228
    6238             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6239             :  * 
    6240             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6241             :  *         return self._shape[0]
    6242             :  * 
    6243             :  */
    6244             : 
    6245             :   /* function exit code */
    6246           0 :   __pyx_L0:;
    6247           0 :   return __pyx_r;
    6248             : }
    6249             : 
    6250             : /* "View.MemoryView":231
    6251             :  *         return self._shape[0]
    6252             :  * 
    6253             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6254             :  *         return getattr(self.memview, attr)
    6255             :  * 
    6256             :  */
    6257             : 
    6258             : /* Python wrapper */
    6259             : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
    6260           0 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
    6261           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6262           0 :   PyObject *__pyx_r = 0;
    6263             :   __Pyx_RefNannyDeclarations
    6264           0 :   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
    6265           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6266           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
    6267             : 
    6268             :   /* function exit code */
    6269           0 :   __Pyx_RefNannyFinishContext();
    6270           0 :   return __pyx_r;
    6271             : }
    6272             : 
    6273           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
    6274           0 :   PyObject *__pyx_r = NULL;
    6275             :   __Pyx_RefNannyDeclarations
    6276           0 :   PyObject *__pyx_t_1 = NULL;
    6277           0 :   PyObject *__pyx_t_2 = NULL;
    6278           0 :   int __pyx_lineno = 0;
    6279           0 :   const char *__pyx_filename = NULL;
    6280           0 :   int __pyx_clineno = 0;
    6281           0 :   __Pyx_RefNannySetupContext("__getattr__", 1);
    6282             : 
    6283             :   /* "View.MemoryView":232
    6284             :  * 
    6285             :  *     def __getattr__(self, attr):
    6286             :  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
    6287             :  * 
    6288             :  *     def __getitem__(self, item):
    6289             :  */
    6290           0 :   __Pyx_XDECREF(__pyx_r);
    6291           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
    6292           0 :   __Pyx_GOTREF(__pyx_t_1);
    6293           0 :   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
    6294           0 :   __Pyx_GOTREF(__pyx_t_2);
    6295           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6296           0 :   __pyx_r = __pyx_t_2;
    6297           0 :   __pyx_t_2 = 0;
    6298           0 :   goto __pyx_L0;
    6299             : 
    6300             :   /* "View.MemoryView":231
    6301             :  *         return self._shape[0]
    6302             :  * 
    6303             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6304             :  *         return getattr(self.memview, attr)
    6305             :  * 
    6306             :  */
    6307             : 
    6308             :   /* function exit code */
    6309           0 :   __pyx_L1_error:;
    6310           0 :   __Pyx_XDECREF(__pyx_t_1);
    6311           0 :   __Pyx_XDECREF(__pyx_t_2);
    6312           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6313           0 :   __pyx_r = NULL;
    6314           0 :   __pyx_L0:;
    6315           0 :   __Pyx_XGIVEREF(__pyx_r);
    6316           0 :   __Pyx_RefNannyFinishContext();
    6317           0 :   return __pyx_r;
    6318             : }
    6319             : 
    6320             : /* "View.MemoryView":234
    6321             :  *         return getattr(self.memview, attr)
    6322             :  * 
    6323             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6324             :  *         return self.memview[item]
    6325             :  * 
    6326             :  */
    6327             : 
    6328             : /* Python wrapper */
    6329             : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
    6330           0 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    6331           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6332           0 :   PyObject *__pyx_r = 0;
    6333             :   __Pyx_RefNannyDeclarations
    6334           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    6335           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6336           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
    6337             : 
    6338             :   /* function exit code */
    6339           0 :   __Pyx_RefNannyFinishContext();
    6340           0 :   return __pyx_r;
    6341             : }
    6342             : 
    6343           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
    6344           0 :   PyObject *__pyx_r = NULL;
    6345             :   __Pyx_RefNannyDeclarations
    6346           0 :   PyObject *__pyx_t_1 = NULL;
    6347           0 :   PyObject *__pyx_t_2 = NULL;
    6348           0 :   int __pyx_lineno = 0;
    6349           0 :   const char *__pyx_filename = NULL;
    6350           0 :   int __pyx_clineno = 0;
    6351           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    6352             : 
    6353             :   /* "View.MemoryView":235
    6354             :  * 
    6355             :  *     def __getitem__(self, item):
    6356             :  *         return self.memview[item]             # <<<<<<<<<<<<<<
    6357             :  * 
    6358             :  *     def __setitem__(self, item, value):
    6359             :  */
    6360           0 :   __Pyx_XDECREF(__pyx_r);
    6361           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
    6362           0 :   __Pyx_GOTREF(__pyx_t_1);
    6363           0 :   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
    6364           0 :   __Pyx_GOTREF(__pyx_t_2);
    6365           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6366           0 :   __pyx_r = __pyx_t_2;
    6367           0 :   __pyx_t_2 = 0;
    6368           0 :   goto __pyx_L0;
    6369             : 
    6370             :   /* "View.MemoryView":234
    6371             :  *         return getattr(self.memview, attr)
    6372             :  * 
    6373             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6374             :  *         return self.memview[item]
    6375             :  * 
    6376             :  */
    6377             : 
    6378             :   /* function exit code */
    6379           0 :   __pyx_L1_error:;
    6380           0 :   __Pyx_XDECREF(__pyx_t_1);
    6381           0 :   __Pyx_XDECREF(__pyx_t_2);
    6382           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6383           0 :   __pyx_r = NULL;
    6384           0 :   __pyx_L0:;
    6385           0 :   __Pyx_XGIVEREF(__pyx_r);
    6386           0 :   __Pyx_RefNannyFinishContext();
    6387           0 :   return __pyx_r;
    6388             : }
    6389             : 
    6390             : /* "View.MemoryView":237
    6391             :  *         return self.memview[item]
    6392             :  * 
    6393             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6394             :  *         self.memview[item] = value
    6395             :  * 
    6396             :  */
    6397             : 
    6398             : /* Python wrapper */
    6399             : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
    6400           0 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6401           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6402           0 :   int __pyx_r;
    6403             :   __Pyx_RefNannyDeclarations
    6404           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    6405           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6406           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
    6407             : 
    6408             :   /* function exit code */
    6409           0 :   __Pyx_RefNannyFinishContext();
    6410           0 :   return __pyx_r;
    6411             : }
    6412             : 
    6413           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6414           0 :   int __pyx_r;
    6415             :   __Pyx_RefNannyDeclarations
    6416           0 :   PyObject *__pyx_t_1 = NULL;
    6417           0 :   int __pyx_lineno = 0;
    6418           0 :   const char *__pyx_filename = NULL;
    6419           0 :   int __pyx_clineno = 0;
    6420           0 :   __Pyx_RefNannySetupContext("__setitem__", 1);
    6421             : 
    6422             :   /* "View.MemoryView":238
    6423             :  * 
    6424             :  *     def __setitem__(self, item, value):
    6425             :  *         self.memview[item] = value             # <<<<<<<<<<<<<<
    6426             :  * 
    6427             :  * 
    6428             :  */
    6429           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
    6430           0 :   __Pyx_GOTREF(__pyx_t_1);
    6431           0 :   if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
    6432           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6433             : 
    6434             :   /* "View.MemoryView":237
    6435             :  *         return self.memview[item]
    6436             :  * 
    6437             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6438             :  *         self.memview[item] = value
    6439             :  * 
    6440             :  */
    6441             : 
    6442             :   /* function exit code */
    6443           0 :   __pyx_r = 0;
    6444           0 :   goto __pyx_L0;
    6445           0 :   __pyx_L1_error:;
    6446           0 :   __Pyx_XDECREF(__pyx_t_1);
    6447           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6448           0 :   __pyx_r = -1;
    6449           0 :   __pyx_L0:;
    6450           0 :   __Pyx_RefNannyFinishContext();
    6451           0 :   return __pyx_r;
    6452             : }
    6453             : 
    6454             : /* "(tree fragment)":1
    6455             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6456             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6457             :  * def __setstate_cython__(self, __pyx_state):
    6458             :  */
    6459             : 
    6460             : /* Python wrapper */
    6461             : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6462             : #if CYTHON_METH_FASTCALL
    6463             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6464             : #else
    6465             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6466             : #endif
    6467             : ); /*proto*/
    6468           0 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6469             : #if CYTHON_METH_FASTCALL
    6470             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6471             : #else
    6472             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6473             : #endif
    6474             : ) {
    6475             :   #if !CYTHON_METH_FASTCALL
    6476             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6477             :   #endif
    6478           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6479           0 :   PyObject *__pyx_r = 0;
    6480             :   __Pyx_RefNannyDeclarations
    6481           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    6482             :   #if !CYTHON_METH_FASTCALL
    6483             :   #if CYTHON_ASSUME_SAFE_MACROS
    6484             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6485             :   #else
    6486             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6487             :   #endif
    6488             :   #endif
    6489           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6490           0 :   if (unlikely(__pyx_nargs > 0)) {
    6491           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    6492           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    6493           0 :   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
    6494             : 
    6495             :   /* function exit code */
    6496           0 :   __Pyx_RefNannyFinishContext();
    6497           0 :   return __pyx_r;
    6498             : }
    6499             : 
    6500           0 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
    6501           0 :   PyObject *__pyx_r = NULL;
    6502             :   __Pyx_RefNannyDeclarations
    6503           0 :   int __pyx_lineno = 0;
    6504           0 :   const char *__pyx_filename = NULL;
    6505           0 :   int __pyx_clineno = 0;
    6506           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    6507             : 
    6508             :   /* "(tree fragment)":2
    6509             :  * def __reduce_cython__(self):
    6510             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6511             :  * def __setstate_cython__(self, __pyx_state):
    6512             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6513             :  */
    6514           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6515           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
    6516             : 
    6517             :   /* "(tree fragment)":1
    6518             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6519             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6520             :  * def __setstate_cython__(self, __pyx_state):
    6521             :  */
    6522             : 
    6523             :   /* function exit code */
    6524           0 :   __pyx_L1_error:;
    6525           0 :   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6526           0 :   __pyx_r = NULL;
    6527           0 :   __Pyx_XGIVEREF(__pyx_r);
    6528           0 :   __Pyx_RefNannyFinishContext();
    6529           0 :   return __pyx_r;
    6530             : }
    6531             : 
    6532             : /* "(tree fragment)":3
    6533             :  * def __reduce_cython__(self):
    6534             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6535             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6536             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6537             :  */
    6538             : 
    6539             : /* Python wrapper */
    6540             : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6541             : #if CYTHON_METH_FASTCALL
    6542             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6543             : #else
    6544             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6545             : #endif
    6546             : ); /*proto*/
    6547           0 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6548             : #if CYTHON_METH_FASTCALL
    6549             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6550             : #else
    6551             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6552             : #endif
    6553             : ) {
    6554           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
    6555             :   #if !CYTHON_METH_FASTCALL
    6556             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6557             :   #endif
    6558           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6559           0 :   PyObject* values[1] = {0};
    6560           0 :   int __pyx_lineno = 0;
    6561           0 :   const char *__pyx_filename = NULL;
    6562           0 :   int __pyx_clineno = 0;
    6563           0 :   PyObject *__pyx_r = 0;
    6564             :   __Pyx_RefNannyDeclarations
    6565           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    6566             :   #if !CYTHON_METH_FASTCALL
    6567             :   #if CYTHON_ASSUME_SAFE_MACROS
    6568             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6569             :   #else
    6570             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6571             :   #endif
    6572             :   #endif
    6573           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6574             :   {
    6575           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    6576           0 :     if (__pyx_kwds) {
    6577           0 :       Py_ssize_t kw_args;
    6578           0 :       switch (__pyx_nargs) {
    6579           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6580           0 :         CYTHON_FALLTHROUGH;
    6581           0 :         case  0: break;
    6582           0 :         default: goto __pyx_L5_argtuple_error;
    6583             :       }
    6584           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    6585           0 :       switch (__pyx_nargs) {
    6586             :         case  0:
    6587           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    6588           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    6589           0 :           kw_args--;
    6590             :         }
    6591           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
    6592           0 :         else goto __pyx_L5_argtuple_error;
    6593             :       }
    6594           0 :       if (unlikely(kw_args > 0)) {
    6595           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6596           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    6597             :       }
    6598           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    6599           0 :       goto __pyx_L5_argtuple_error;
    6600             :     } else {
    6601           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6602             :     }
    6603           0 :     __pyx_v___pyx_state = values[0];
    6604             :   }
    6605           0 :   goto __pyx_L6_skip;
    6606           0 :   __pyx_L5_argtuple_error:;
    6607           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
    6608           0 :   __pyx_L6_skip:;
    6609           0 :   goto __pyx_L4_argument_unpacking_done;
    6610           0 :   __pyx_L3_error:;
    6611             :   {
    6612           0 :     Py_ssize_t __pyx_temp;
    6613           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6614             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6615             :     }
    6616             :   }
    6617           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6618           0 :   __Pyx_RefNannyFinishContext();
    6619           0 :   return NULL;
    6620           0 :   __pyx_L4_argument_unpacking_done:;
    6621           0 :   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
    6622             : 
    6623             :   /* function exit code */
    6624             :   {
    6625           0 :     Py_ssize_t __pyx_temp;
    6626           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6627             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6628             :     }
    6629             :   }
    6630             :   __Pyx_RefNannyFinishContext();
    6631             :   return __pyx_r;
    6632             : }
    6633             : 
    6634           0 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
    6635           0 :   PyObject *__pyx_r = NULL;
    6636             :   __Pyx_RefNannyDeclarations
    6637           0 :   int __pyx_lineno = 0;
    6638           0 :   const char *__pyx_filename = NULL;
    6639           0 :   int __pyx_clineno = 0;
    6640           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    6641             : 
    6642             :   /* "(tree fragment)":4
    6643             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6644             :  * def __setstate_cython__(self, __pyx_state):
    6645             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6646             :  */
    6647           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6648           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
    6649             : 
    6650             :   /* "(tree fragment)":3
    6651             :  * def __reduce_cython__(self):
    6652             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6653             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6654             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6655             :  */
    6656             : 
    6657             :   /* function exit code */
    6658           0 :   __pyx_L1_error:;
    6659           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6660           0 :   __pyx_r = NULL;
    6661           0 :   __Pyx_XGIVEREF(__pyx_r);
    6662           0 :   __Pyx_RefNannyFinishContext();
    6663           0 :   return __pyx_r;
    6664             : }
    6665             : 
    6666             : /* "View.MemoryView":248
    6667             :  * 
    6668             :  * @cname("__pyx_array_allocate_buffer")
    6669             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6670             :  * 
    6671             :  * 
    6672             :  */
    6673             : 
    6674           0 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
    6675           0 :   Py_ssize_t __pyx_v_i;
    6676           0 :   PyObject **__pyx_v_p;
    6677           0 :   int __pyx_r;
    6678           0 :   int __pyx_t_1;
    6679           0 :   Py_ssize_t __pyx_t_2;
    6680           0 :   Py_ssize_t __pyx_t_3;
    6681           0 :   Py_ssize_t __pyx_t_4;
    6682           0 :   int __pyx_lineno = 0;
    6683           0 :   const char *__pyx_filename = NULL;
    6684           0 :   int __pyx_clineno = 0;
    6685             : 
    6686             :   /* "View.MemoryView":254
    6687             :  *     cdef PyObject **p
    6688             :  * 
    6689             :  *     self.free_data = True             # <<<<<<<<<<<<<<
    6690             :  *     self.data = <char *>malloc(self.len)
    6691             :  *     if not self.data:
    6692             :  */
    6693           0 :   __pyx_v_self->free_data = 1;
    6694             : 
    6695             :   /* "View.MemoryView":255
    6696             :  * 
    6697             :  *     self.free_data = True
    6698             :  *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
    6699             :  *     if not self.data:
    6700             :  *         raise MemoryError, "unable to allocate array data."
    6701             :  */
    6702           0 :   __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
    6703             : 
    6704             :   /* "View.MemoryView":256
    6705             :  *     self.free_data = True
    6706             :  *     self.data = <char *>malloc(self.len)
    6707             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6708             :  *         raise MemoryError, "unable to allocate array data."
    6709             :  * 
    6710             :  */
    6711           0 :   __pyx_t_1 = (!(__pyx_v_self->data != 0));
    6712           0 :   if (unlikely(__pyx_t_1)) {
    6713             : 
    6714             :     /* "View.MemoryView":257
    6715             :  *     self.data = <char *>malloc(self.len)
    6716             :  *     if not self.data:
    6717             :  *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
    6718             :  * 
    6719             :  *     if self.dtype_is_object:
    6720             :  */
    6721           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
    6722           0 :     __PYX_ERR(1, 257, __pyx_L1_error)
    6723             : 
    6724             :     /* "View.MemoryView":256
    6725             :  *     self.free_data = True
    6726             :  *     self.data = <char *>malloc(self.len)
    6727             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6728             :  *         raise MemoryError, "unable to allocate array data."
    6729             :  * 
    6730             :  */
    6731             :   }
    6732             : 
    6733             :   /* "View.MemoryView":259
    6734             :  *         raise MemoryError, "unable to allocate array data."
    6735             :  * 
    6736             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6737             :  *         p = <PyObject **> self.data
    6738             :  *         for i in range(self.len // self.itemsize):
    6739             :  */
    6740           0 :   if (__pyx_v_self->dtype_is_object) {
    6741             : 
    6742             :     /* "View.MemoryView":260
    6743             :  * 
    6744             :  *     if self.dtype_is_object:
    6745             :  *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
    6746             :  *         for i in range(self.len // self.itemsize):
    6747             :  *             p[i] = Py_None
    6748             :  */
    6749           0 :     __pyx_v_p = ((PyObject **)__pyx_v_self->data);
    6750             : 
    6751             :     /* "View.MemoryView":261
    6752             :  *     if self.dtype_is_object:
    6753             :  *         p = <PyObject **> self.data
    6754             :  *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
    6755             :  *             p[i] = Py_None
    6756             :  *             Py_INCREF(Py_None)
    6757             :  */
    6758           0 :     if (unlikely(__pyx_v_self->itemsize == 0)) {
    6759           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    6760           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6761             :     }
    6762           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
    6763           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
    6764           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6765             :     }
    6766           0 :     __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
    6767           0 :     __pyx_t_3 = __pyx_t_2;
    6768           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    6769           0 :       __pyx_v_i = __pyx_t_4;
    6770             : 
    6771             :       /* "View.MemoryView":262
    6772             :  *         p = <PyObject **> self.data
    6773             :  *         for i in range(self.len // self.itemsize):
    6774             :  *             p[i] = Py_None             # <<<<<<<<<<<<<<
    6775             :  *             Py_INCREF(Py_None)
    6776             :  *     return 0
    6777             :  */
    6778           0 :       (__pyx_v_p[__pyx_v_i]) = Py_None;
    6779             : 
    6780             :       /* "View.MemoryView":263
    6781             :  *         for i in range(self.len // self.itemsize):
    6782             :  *             p[i] = Py_None
    6783             :  *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    6784             :  *     return 0
    6785             :  * 
    6786             :  */
    6787           0 :       Py_INCREF(Py_None);
    6788             :     }
    6789             : 
    6790             :     /* "View.MemoryView":259
    6791             :  *         raise MemoryError, "unable to allocate array data."
    6792             :  * 
    6793             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6794             :  *         p = <PyObject **> self.data
    6795             :  *         for i in range(self.len // self.itemsize):
    6796             :  */
    6797             :   }
    6798             : 
    6799             :   /* "View.MemoryView":264
    6800             :  *             p[i] = Py_None
    6801             :  *             Py_INCREF(Py_None)
    6802             :  *     return 0             # <<<<<<<<<<<<<<
    6803             :  * 
    6804             :  * 
    6805             :  */
    6806           0 :   __pyx_r = 0;
    6807           0 :   goto __pyx_L0;
    6808             : 
    6809             :   /* "View.MemoryView":248
    6810             :  * 
    6811             :  * @cname("__pyx_array_allocate_buffer")
    6812             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6813             :  * 
    6814             :  * 
    6815             :  */
    6816             : 
    6817             :   /* function exit code */
    6818           0 :   __pyx_L1_error:;
    6819           0 :   __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6820           0 :   __pyx_r = -1;
    6821           0 :   __pyx_L0:;
    6822           0 :   return __pyx_r;
    6823             : }
    6824             : 
    6825             : /* "View.MemoryView":268
    6826             :  * 
    6827             :  * @cname("__pyx_array_new")
    6828             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6829             :  *     cdef array result
    6830             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6831             :  */
    6832             : 
    6833           0 : static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
    6834           0 :   struct __pyx_array_obj *__pyx_v_result = 0;
    6835           0 :   PyObject *__pyx_v_mode = 0;
    6836           0 :   struct __pyx_array_obj *__pyx_r = NULL;
    6837             :   __Pyx_RefNannyDeclarations
    6838           0 :   PyObject *__pyx_t_1 = NULL;
    6839           0 :   int __pyx_t_2;
    6840           0 :   PyObject *__pyx_t_3 = NULL;
    6841           0 :   PyObject *__pyx_t_4 = NULL;
    6842           0 :   int __pyx_lineno = 0;
    6843           0 :   const char *__pyx_filename = NULL;
    6844           0 :   int __pyx_clineno = 0;
    6845           0 :   __Pyx_RefNannySetupContext("array_cwrapper", 1);
    6846             : 
    6847             :   /* "View.MemoryView":270
    6848             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
    6849             :  *     cdef array result
    6850             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
    6851             :  * 
    6852             :  *     if buf is NULL:
    6853             :  */
    6854           0 :   __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
    6855           0 :   if (__pyx_t_2) {
    6856           0 :     __Pyx_INCREF(__pyx_n_s_fortran);
    6857             :     __pyx_t_1 = __pyx_n_s_fortran;
    6858             :   } else {
    6859           0 :     __Pyx_INCREF(__pyx_n_s_c);
    6860             :     __pyx_t_1 = __pyx_n_s_c;
    6861             :   }
    6862           0 :   __pyx_v_mode = ((PyObject*)__pyx_t_1);
    6863           0 :   __pyx_t_1 = 0;
    6864             : 
    6865             :   /* "View.MemoryView":272
    6866             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6867             :  * 
    6868             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6869             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6870             :  *     else:
    6871             :  */
    6872           0 :   __pyx_t_2 = (__pyx_v_buf == NULL);
    6873           0 :   if (__pyx_t_2) {
    6874             : 
    6875             :     /* "View.MemoryView":273
    6876             :  * 
    6877             :  *     if buf is NULL:
    6878             :  *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
    6879             :  *     else:
    6880             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6881             :  */
    6882           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    6883           0 :     __Pyx_GOTREF(__pyx_t_1);
    6884           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6885           0 :     __Pyx_GOTREF(__pyx_t_3);
    6886           0 :     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    6887           0 :     __Pyx_GOTREF(__pyx_t_4);
    6888           0 :     __Pyx_INCREF(__pyx_v_shape);
    6889           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6890           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
    6891           0 :     __Pyx_GIVEREF(__pyx_t_1);
    6892           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
    6893           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6894           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
    6895           0 :     __Pyx_INCREF(__pyx_v_mode);
    6896           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6897           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
    6898           0 :     __pyx_t_1 = 0;
    6899           0 :     __pyx_t_3 = 0;
    6900           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6901           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6902           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6903           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6904           0 :     __pyx_t_3 = 0;
    6905             : 
    6906             :     /* "View.MemoryView":272
    6907             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6908             :  * 
    6909             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6910             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6911             :  *     else:
    6912             :  */
    6913           0 :     goto __pyx_L3;
    6914             :   }
    6915             : 
    6916             :   /* "View.MemoryView":275
    6917             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6918             :  *     else:
    6919             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
    6920             :  *         result.data = buf
    6921             :  * 
    6922             :  */
    6923             :   /*else*/ {
    6924           0 :     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6925           0 :     __Pyx_GOTREF(__pyx_t_3);
    6926           0 :     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6927           0 :     __Pyx_GOTREF(__pyx_t_4);
    6928           0 :     __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
    6929           0 :     __Pyx_GOTREF(__pyx_t_1);
    6930           0 :     __Pyx_INCREF(__pyx_v_shape);
    6931           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6932           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
    6933           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6934           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
    6935           0 :     __Pyx_GIVEREF(__pyx_t_4);
    6936           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
    6937           0 :     __Pyx_INCREF(__pyx_v_mode);
    6938           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6939           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
    6940           0 :     __pyx_t_3 = 0;
    6941           0 :     __pyx_t_4 = 0;
    6942           0 :     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6943           0 :     __Pyx_GOTREF(__pyx_t_4);
    6944           0 :     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
    6945           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6946           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6947           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6948           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6949           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6950           0 :     __pyx_t_3 = 0;
    6951             : 
    6952             :     /* "View.MemoryView":276
    6953             :  *     else:
    6954             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6955             :  *         result.data = buf             # <<<<<<<<<<<<<<
    6956             :  * 
    6957             :  *     return result
    6958             :  */
    6959           0 :     __pyx_v_result->data = __pyx_v_buf;
    6960             :   }
    6961           0 :   __pyx_L3:;
    6962             : 
    6963             :   /* "View.MemoryView":278
    6964             :  *         result.data = buf
    6965             :  * 
    6966             :  *     return result             # <<<<<<<<<<<<<<
    6967             :  * 
    6968             :  * 
    6969             :  */
    6970           0 :   __Pyx_XDECREF((PyObject *)__pyx_r);
    6971           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
    6972           0 :   __pyx_r = __pyx_v_result;
    6973           0 :   goto __pyx_L0;
    6974             : 
    6975             :   /* "View.MemoryView":268
    6976             :  * 
    6977             :  * @cname("__pyx_array_new")
    6978             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6979             :  *     cdef array result
    6980             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6981             :  */
    6982             : 
    6983             :   /* function exit code */
    6984           0 :   __pyx_L1_error:;
    6985           0 :   __Pyx_XDECREF(__pyx_t_1);
    6986           0 :   __Pyx_XDECREF(__pyx_t_3);
    6987           0 :   __Pyx_XDECREF(__pyx_t_4);
    6988           0 :   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6989           0 :   __pyx_r = 0;
    6990           0 :   __pyx_L0:;
    6991           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
    6992           0 :   __Pyx_XDECREF(__pyx_v_mode);
    6993           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
    6994           0 :   __Pyx_RefNannyFinishContext();
    6995           0 :   return __pyx_r;
    6996             : }
    6997             : 
    6998             : /* "View.MemoryView":304
    6999             :  * cdef class Enum(object):
    7000             :  *     cdef object name
    7001             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    7002             :  *         self.name = name
    7003             :  *     def __repr__(self):
    7004             :  */
    7005             : 
    7006             : /* Python wrapper */
    7007             : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7008          15 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7009          15 :   PyObject *__pyx_v_name = 0;
    7010          15 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7011          15 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7012          15 :   PyObject* values[1] = {0};
    7013          15 :   int __pyx_lineno = 0;
    7014          15 :   const char *__pyx_filename = NULL;
    7015          15 :   int __pyx_clineno = 0;
    7016          15 :   int __pyx_r;
    7017             :   __Pyx_RefNannyDeclarations
    7018          15 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
    7019             :   #if CYTHON_ASSUME_SAFE_MACROS
    7020          15 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7021             :   #else
    7022             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7023             :   #endif
    7024          15 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7025             :   {
    7026          15 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    7027          15 :     if (__pyx_kwds) {
    7028           0 :       Py_ssize_t kw_args;
    7029           0 :       switch (__pyx_nargs) {
    7030           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7031           0 :         CYTHON_FALLTHROUGH;
    7032           0 :         case  0: break;
    7033           0 :         default: goto __pyx_L5_argtuple_error;
    7034             :       }
    7035           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7036           0 :       switch (__pyx_nargs) {
    7037           0 :         case  0:
    7038           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
    7039           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    7040           0 :           kw_args--;
    7041             :         }
    7042           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
    7043           0 :         else goto __pyx_L5_argtuple_error;
    7044             :       }
    7045           0 :       if (unlikely(kw_args > 0)) {
    7046           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7047           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
    7048             :       }
    7049          15 :     } else if (unlikely(__pyx_nargs != 1)) {
    7050           0 :       goto __pyx_L5_argtuple_error;
    7051             :     } else {
    7052          15 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7053             :     }
    7054          15 :     __pyx_v_name = values[0];
    7055             :   }
    7056          15 :   goto __pyx_L6_skip;
    7057           0 :   __pyx_L5_argtuple_error:;
    7058           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
    7059          15 :   __pyx_L6_skip:;
    7060          15 :   goto __pyx_L4_argument_unpacking_done;
    7061           0 :   __pyx_L3_error:;
    7062             :   {
    7063           0 :     Py_ssize_t __pyx_temp;
    7064           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7065             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7066             :     }
    7067             :   }
    7068           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7069           0 :   __Pyx_RefNannyFinishContext();
    7070           0 :   return -1;
    7071          15 :   __pyx_L4_argument_unpacking_done:;
    7072          15 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
    7073             : 
    7074             :   /* function exit code */
    7075             :   {
    7076          15 :     Py_ssize_t __pyx_temp;
    7077          15 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7078             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7079             :     }
    7080             :   }
    7081             :   __Pyx_RefNannyFinishContext();
    7082             :   return __pyx_r;
    7083             : }
    7084             : 
    7085          15 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
    7086          15 :   int __pyx_r;
    7087             :   __Pyx_RefNannyDeclarations
    7088          15 :   __Pyx_RefNannySetupContext("__init__", 1);
    7089             : 
    7090             :   /* "View.MemoryView":305
    7091             :  *     cdef object name
    7092             :  *     def __init__(self, name):
    7093             :  *         self.name = name             # <<<<<<<<<<<<<<
    7094             :  *     def __repr__(self):
    7095             :  *         return self.name
    7096             :  */
    7097          15 :   __Pyx_INCREF(__pyx_v_name);
    7098          15 :   __Pyx_GIVEREF(__pyx_v_name);
    7099          15 :   __Pyx_GOTREF(__pyx_v_self->name);
    7100          15 :   __Pyx_DECREF(__pyx_v_self->name);
    7101          15 :   __pyx_v_self->name = __pyx_v_name;
    7102             : 
    7103             :   /* "View.MemoryView":304
    7104             :  * cdef class Enum(object):
    7105             :  *     cdef object name
    7106             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    7107             :  *         self.name = name
    7108             :  *     def __repr__(self):
    7109             :  */
    7110             : 
    7111             :   /* function exit code */
    7112          15 :   __pyx_r = 0;
    7113          15 :   __Pyx_RefNannyFinishContext();
    7114          15 :   return __pyx_r;
    7115             : }
    7116             : 
    7117             : /* "View.MemoryView":306
    7118             :  *     def __init__(self, name):
    7119             :  *         self.name = name
    7120             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    7121             :  *         return self.name
    7122             :  * 
    7123             :  */
    7124             : 
    7125             : /* Python wrapper */
    7126             : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
    7127           0 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
    7128           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7129           0 :   PyObject *__pyx_r = 0;
    7130             :   __Pyx_RefNannyDeclarations
    7131           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
    7132           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7133           0 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7134             : 
    7135             :   /* function exit code */
    7136           0 :   __Pyx_RefNannyFinishContext();
    7137           0 :   return __pyx_r;
    7138             : }
    7139             : 
    7140           0 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7141           0 :   PyObject *__pyx_r = NULL;
    7142             :   __Pyx_RefNannyDeclarations
    7143           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
    7144             : 
    7145             :   /* "View.MemoryView":307
    7146             :  *         self.name = name
    7147             :  *     def __repr__(self):
    7148             :  *         return self.name             # <<<<<<<<<<<<<<
    7149             :  * 
    7150             :  * cdef generic = Enum("<strided and direct or indirect>")
    7151             :  */
    7152           0 :   __Pyx_XDECREF(__pyx_r);
    7153           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7154           0 :   __pyx_r = __pyx_v_self->name;
    7155           0 :   goto __pyx_L0;
    7156             : 
    7157             :   /* "View.MemoryView":306
    7158             :  *     def __init__(self, name):
    7159             :  *         self.name = name
    7160             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    7161             :  *         return self.name
    7162             :  * 
    7163             :  */
    7164             : 
    7165             :   /* function exit code */
    7166           0 :   __pyx_L0:;
    7167           0 :   __Pyx_XGIVEREF(__pyx_r);
    7168           0 :   __Pyx_RefNannyFinishContext();
    7169           0 :   return __pyx_r;
    7170             : }
    7171             : 
    7172             : /* "(tree fragment)":1
    7173             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7174             :  *     cdef tuple state
    7175             :  *     cdef object _dict
    7176             :  */
    7177             : 
    7178             : /* Python wrapper */
    7179             : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    7180             : #if CYTHON_METH_FASTCALL
    7181             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7182             : #else
    7183             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7184             : #endif
    7185             : ); /*proto*/
    7186           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    7187             : #if CYTHON_METH_FASTCALL
    7188             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7189             : #else
    7190             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7191             : #endif
    7192             : ) {
    7193             :   #if !CYTHON_METH_FASTCALL
    7194             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7195             :   #endif
    7196           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7197           0 :   PyObject *__pyx_r = 0;
    7198             :   __Pyx_RefNannyDeclarations
    7199           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    7200             :   #if !CYTHON_METH_FASTCALL
    7201             :   #if CYTHON_ASSUME_SAFE_MACROS
    7202             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7203             :   #else
    7204             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7205             :   #endif
    7206             :   #endif
    7207           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7208           0 :   if (unlikely(__pyx_nargs > 0)) {
    7209           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    7210           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    7211           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7212             : 
    7213             :   /* function exit code */
    7214           0 :   __Pyx_RefNannyFinishContext();
    7215           0 :   return __pyx_r;
    7216             : }
    7217             : 
    7218           0 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7219           0 :   PyObject *__pyx_v_state = 0;
    7220           0 :   PyObject *__pyx_v__dict = 0;
    7221           0 :   int __pyx_v_use_setstate;
    7222           0 :   PyObject *__pyx_r = NULL;
    7223             :   __Pyx_RefNannyDeclarations
    7224           0 :   PyObject *__pyx_t_1 = NULL;
    7225           0 :   int __pyx_t_2;
    7226           0 :   PyObject *__pyx_t_3 = NULL;
    7227           0 :   PyObject *__pyx_t_4 = NULL;
    7228           0 :   int __pyx_lineno = 0;
    7229           0 :   const char *__pyx_filename = NULL;
    7230           0 :   int __pyx_clineno = 0;
    7231           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    7232             : 
    7233             :   /* "(tree fragment)":5
    7234             :  *     cdef object _dict
    7235             :  *     cdef bint use_setstate
    7236             :  *     state = (self.name,)             # <<<<<<<<<<<<<<
    7237             :  *     _dict = getattr(self, '__dict__', None)
    7238             :  *     if _dict is not None:
    7239             :  */
    7240           0 :   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    7241           0 :   __Pyx_GOTREF(__pyx_t_1);
    7242           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7243           0 :   __Pyx_GIVEREF(__pyx_v_self->name);
    7244           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
    7245           0 :   __pyx_v_state = ((PyObject*)__pyx_t_1);
    7246           0 :   __pyx_t_1 = 0;
    7247             : 
    7248             :   /* "(tree fragment)":6
    7249             :  *     cdef bint use_setstate
    7250             :  *     state = (self.name,)
    7251             :  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
    7252             :  *     if _dict is not None:
    7253             :  *         state += (_dict,)
    7254             :  */
    7255           0 :   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    7256           0 :   __Pyx_GOTREF(__pyx_t_1);
    7257           0 :   __pyx_v__dict = __pyx_t_1;
    7258           0 :   __pyx_t_1 = 0;
    7259             : 
    7260             :   /* "(tree fragment)":7
    7261             :  *     state = (self.name,)
    7262             :  *     _dict = getattr(self, '__dict__', None)
    7263             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7264             :  *         state += (_dict,)
    7265             :  *         use_setstate = True
    7266             :  */
    7267           0 :   __pyx_t_2 = (__pyx_v__dict != Py_None);
    7268           0 :   if (__pyx_t_2) {
    7269             : 
    7270             :     /* "(tree fragment)":8
    7271             :  *     _dict = getattr(self, '__dict__', None)
    7272             :  *     if _dict is not None:
    7273             :  *         state += (_dict,)             # <<<<<<<<<<<<<<
    7274             :  *         use_setstate = True
    7275             :  *     else:
    7276             :  */
    7277           0 :     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    7278           0 :     __Pyx_GOTREF(__pyx_t_1);
    7279           0 :     __Pyx_INCREF(__pyx_v__dict);
    7280           0 :     __Pyx_GIVEREF(__pyx_v__dict);
    7281           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    7282           0 :     __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    7283           0 :     __Pyx_GOTREF(__pyx_t_3);
    7284           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7285           0 :     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    7286           0 :     __pyx_t_3 = 0;
    7287             : 
    7288             :     /* "(tree fragment)":9
    7289             :  *     if _dict is not None:
    7290             :  *         state += (_dict,)
    7291             :  *         use_setstate = True             # <<<<<<<<<<<<<<
    7292             :  *     else:
    7293             :  *         use_setstate = self.name is not None
    7294             :  */
    7295           0 :     __pyx_v_use_setstate = 1;
    7296             : 
    7297             :     /* "(tree fragment)":7
    7298             :  *     state = (self.name,)
    7299             :  *     _dict = getattr(self, '__dict__', None)
    7300             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7301             :  *         state += (_dict,)
    7302             :  *         use_setstate = True
    7303             :  */
    7304           0 :     goto __pyx_L3;
    7305             :   }
    7306             : 
    7307             :   /* "(tree fragment)":11
    7308             :  *         use_setstate = True
    7309             :  *     else:
    7310             :  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
    7311             :  *     if use_setstate:
    7312             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7313             :  */
    7314             :   /*else*/ {
    7315           0 :     __pyx_t_2 = (__pyx_v_self->name != Py_None);
    7316           0 :     __pyx_v_use_setstate = __pyx_t_2;
    7317             :   }
    7318           0 :   __pyx_L3:;
    7319             : 
    7320             :   /* "(tree fragment)":12
    7321             :  *     else:
    7322             :  *         use_setstate = self.name is not None
    7323             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7324             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7325             :  *     else:
    7326             :  */
    7327           0 :   if (__pyx_v_use_setstate) {
    7328             : 
    7329             :     /* "(tree fragment)":13
    7330             :  *         use_setstate = self.name is not None
    7331             :  *     if use_setstate:
    7332             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
    7333             :  *     else:
    7334             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7335             :  */
    7336           0 :     __Pyx_XDECREF(__pyx_r);
    7337           0 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    7338           0 :     __Pyx_GOTREF(__pyx_t_3);
    7339           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    7340           0 :     __Pyx_GOTREF(__pyx_t_1);
    7341           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7342           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7343           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    7344           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7345           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7346           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
    7347           0 :     __Pyx_INCREF(Py_None);
    7348           0 :     __Pyx_GIVEREF(Py_None);
    7349           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    7350           0 :     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    7351           0 :     __Pyx_GOTREF(__pyx_t_4);
    7352           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7353           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    7354           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7355           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    7356           0 :     __Pyx_INCREF(__pyx_v_state);
    7357           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7358           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    7359           0 :     __pyx_t_3 = 0;
    7360           0 :     __pyx_t_1 = 0;
    7361           0 :     __pyx_r = __pyx_t_4;
    7362           0 :     __pyx_t_4 = 0;
    7363           0 :     goto __pyx_L0;
    7364             : 
    7365             :     /* "(tree fragment)":12
    7366             :  *     else:
    7367             :  *         use_setstate = self.name is not None
    7368             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7369             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7370             :  *     else:
    7371             :  */
    7372             :   }
    7373             : 
    7374             :   /* "(tree fragment)":15
    7375             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7376             :  *     else:
    7377             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
    7378             :  * def __setstate_cython__(self, __pyx_state):
    7379             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7380             :  */
    7381             :   /*else*/ {
    7382           0 :     __Pyx_XDECREF(__pyx_r);
    7383           0 :     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    7384           0 :     __Pyx_GOTREF(__pyx_t_4);
    7385           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    7386           0 :     __Pyx_GOTREF(__pyx_t_1);
    7387           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7388           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7389           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    7390           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7391           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7392           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
    7393           0 :     __Pyx_INCREF(__pyx_v_state);
    7394           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7395           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    7396           0 :     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    7397           0 :     __Pyx_GOTREF(__pyx_t_3);
    7398           0 :     __Pyx_GIVEREF(__pyx_t_4);
    7399           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    7400           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7401           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    7402           0 :     __pyx_t_4 = 0;
    7403           0 :     __pyx_t_1 = 0;
    7404           0 :     __pyx_r = __pyx_t_3;
    7405           0 :     __pyx_t_3 = 0;
    7406           0 :     goto __pyx_L0;
    7407             :   }
    7408             : 
    7409             :   /* "(tree fragment)":1
    7410             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7411             :  *     cdef tuple state
    7412             :  *     cdef object _dict
    7413             :  */
    7414             : 
    7415             :   /* function exit code */
    7416           0 :   __pyx_L1_error:;
    7417           0 :   __Pyx_XDECREF(__pyx_t_1);
    7418           0 :   __Pyx_XDECREF(__pyx_t_3);
    7419           0 :   __Pyx_XDECREF(__pyx_t_4);
    7420           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7421           0 :   __pyx_r = NULL;
    7422           0 :   __pyx_L0:;
    7423           0 :   __Pyx_XDECREF(__pyx_v_state);
    7424           0 :   __Pyx_XDECREF(__pyx_v__dict);
    7425           0 :   __Pyx_XGIVEREF(__pyx_r);
    7426           0 :   __Pyx_RefNannyFinishContext();
    7427           0 :   return __pyx_r;
    7428             : }
    7429             : 
    7430             : /* "(tree fragment)":16
    7431             :  *     else:
    7432             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7433             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7434             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7435             :  */
    7436             : 
    7437             : /* Python wrapper */
    7438             : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7439             : #if CYTHON_METH_FASTCALL
    7440             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7441             : #else
    7442             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7443             : #endif
    7444             : ); /*proto*/
    7445           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7446             : #if CYTHON_METH_FASTCALL
    7447             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7448             : #else
    7449             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7450             : #endif
    7451             : ) {
    7452           0 :   PyObject *__pyx_v___pyx_state = 0;
    7453             :   #if !CYTHON_METH_FASTCALL
    7454             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7455             :   #endif
    7456           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7457           0 :   PyObject* values[1] = {0};
    7458           0 :   int __pyx_lineno = 0;
    7459           0 :   const char *__pyx_filename = NULL;
    7460           0 :   int __pyx_clineno = 0;
    7461           0 :   PyObject *__pyx_r = 0;
    7462             :   __Pyx_RefNannyDeclarations
    7463           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    7464             :   #if !CYTHON_METH_FASTCALL
    7465             :   #if CYTHON_ASSUME_SAFE_MACROS
    7466             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7467             :   #else
    7468             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7469             :   #endif
    7470             :   #endif
    7471           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7472             :   {
    7473           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    7474           0 :     if (__pyx_kwds) {
    7475           0 :       Py_ssize_t kw_args;
    7476           0 :       switch (__pyx_nargs) {
    7477           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7478           0 :         CYTHON_FALLTHROUGH;
    7479           0 :         case  0: break;
    7480           0 :         default: goto __pyx_L5_argtuple_error;
    7481             :       }
    7482           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    7483           0 :       switch (__pyx_nargs) {
    7484             :         case  0:
    7485           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    7486           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    7487           0 :           kw_args--;
    7488             :         }
    7489           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
    7490           0 :         else goto __pyx_L5_argtuple_error;
    7491             :       }
    7492           0 :       if (unlikely(kw_args > 0)) {
    7493           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7494           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    7495             :       }
    7496           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    7497           0 :       goto __pyx_L5_argtuple_error;
    7498             :     } else {
    7499           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7500             :     }
    7501           0 :     __pyx_v___pyx_state = values[0];
    7502             :   }
    7503           0 :   goto __pyx_L6_skip;
    7504           0 :   __pyx_L5_argtuple_error:;
    7505           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
    7506           0 :   __pyx_L6_skip:;
    7507           0 :   goto __pyx_L4_argument_unpacking_done;
    7508           0 :   __pyx_L3_error:;
    7509             :   {
    7510           0 :     Py_ssize_t __pyx_temp;
    7511           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7512             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7513             :     }
    7514             :   }
    7515           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7516           0 :   __Pyx_RefNannyFinishContext();
    7517           0 :   return NULL;
    7518           0 :   __pyx_L4_argument_unpacking_done:;
    7519           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
    7520             : 
    7521             :   /* function exit code */
    7522             :   {
    7523           0 :     Py_ssize_t __pyx_temp;
    7524           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7525             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7526             :     }
    7527             :   }
    7528             :   __Pyx_RefNannyFinishContext();
    7529             :   return __pyx_r;
    7530             : }
    7531             : 
    7532           0 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
    7533           0 :   PyObject *__pyx_r = NULL;
    7534             :   __Pyx_RefNannyDeclarations
    7535           0 :   PyObject *__pyx_t_1 = NULL;
    7536           0 :   int __pyx_lineno = 0;
    7537           0 :   const char *__pyx_filename = NULL;
    7538           0 :   int __pyx_clineno = 0;
    7539           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    7540             : 
    7541             :   /* "(tree fragment)":17
    7542             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7543             :  * def __setstate_cython__(self, __pyx_state):
    7544             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
    7545             :  */
    7546           0 :   if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
    7547           0 :   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
    7548           0 :   __Pyx_GOTREF(__pyx_t_1);
    7549           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7550             : 
    7551             :   /* "(tree fragment)":16
    7552             :  *     else:
    7553             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7554             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7555             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7556             :  */
    7557             : 
    7558             :   /* function exit code */
    7559           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    7560           0 :   goto __pyx_L0;
    7561           0 :   __pyx_L1_error:;
    7562           0 :   __Pyx_XDECREF(__pyx_t_1);
    7563           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7564           0 :   __pyx_r = NULL;
    7565           0 :   __pyx_L0:;
    7566           0 :   __Pyx_XGIVEREF(__pyx_r);
    7567           0 :   __Pyx_RefNannyFinishContext();
    7568           0 :   return __pyx_r;
    7569             : }
    7570             : 
    7571             : /* "View.MemoryView":349
    7572             :  *     cdef __Pyx_TypeInfo *typeinfo
    7573             :  * 
    7574             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7575             :  *         self.obj = obj
    7576             :  *         self.flags = flags
    7577             :  */
    7578             : 
    7579             : /* Python wrapper */
    7580             : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7581         772 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7582         772 :   PyObject *__pyx_v_obj = 0;
    7583         772 :   int __pyx_v_flags;
    7584         772 :   int __pyx_v_dtype_is_object;
    7585         772 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7586         772 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7587         772 :   PyObject* values[3] = {0,0,0};
    7588         772 :   int __pyx_lineno = 0;
    7589         772 :   const char *__pyx_filename = NULL;
    7590         772 :   int __pyx_clineno = 0;
    7591         772 :   int __pyx_r;
    7592             :   __Pyx_RefNannyDeclarations
    7593         772 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    7594             :   #if CYTHON_ASSUME_SAFE_MACROS
    7595         772 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7596             :   #else
    7597             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7598             :   #endif
    7599         772 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7600             :   {
    7601         772 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    7602         772 :     if (__pyx_kwds) {
    7603           0 :       Py_ssize_t kw_args;
    7604           0 :       switch (__pyx_nargs) {
    7605           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7606           0 :         CYTHON_FALLTHROUGH;
    7607           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7608           0 :         CYTHON_FALLTHROUGH;
    7609           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7610           0 :         CYTHON_FALLTHROUGH;
    7611           0 :         case  0: break;
    7612           0 :         default: goto __pyx_L5_argtuple_error;
    7613             :       }
    7614           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7615           0 :       switch (__pyx_nargs) {
    7616           0 :         case  0:
    7617           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
    7618           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    7619           0 :           kw_args--;
    7620             :         }
    7621           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7622           0 :         else goto __pyx_L5_argtuple_error;
    7623           0 :         CYTHON_FALLTHROUGH;
    7624             :         case  1:
    7625           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
    7626           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    7627           0 :           kw_args--;
    7628             :         }
    7629           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7630             :         else {
    7631           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
    7632             :         }
    7633           0 :         CYTHON_FALLTHROUGH;
    7634             :         case  2:
    7635           0 :         if (kw_args > 0) {
    7636           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
    7637           0 :           if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    7638           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7639             :         }
    7640             :       }
    7641           0 :       if (unlikely(kw_args > 0)) {
    7642           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7643           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
    7644             :       }
    7645             :     } else {
    7646         772 :       switch (__pyx_nargs) {
    7647         772 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7648         772 :         CYTHON_FALLTHROUGH;
    7649         772 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7650         772 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7651         772 :         break;
    7652           0 :         default: goto __pyx_L5_argtuple_error;
    7653             :       }
    7654             :     }
    7655         772 :     __pyx_v_obj = values[0];
    7656         772 :     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7657         772 :     if (values[2]) {
    7658         772 :       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7659             :     } else {
    7660             :       __pyx_v_dtype_is_object = ((int)0);
    7661             :     }
    7662             :   }
    7663         772 :   goto __pyx_L6_skip;
    7664           0 :   __pyx_L5_argtuple_error:;
    7665           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
    7666         772 :   __pyx_L6_skip:;
    7667         772 :   goto __pyx_L4_argument_unpacking_done;
    7668           0 :   __pyx_L3_error:;
    7669             :   {
    7670           0 :     Py_ssize_t __pyx_temp;
    7671           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7672             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7673             :     }
    7674             :   }
    7675           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7676           0 :   __Pyx_RefNannyFinishContext();
    7677           0 :   return -1;
    7678         772 :   __pyx_L4_argument_unpacking_done:;
    7679         772 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
    7680             : 
    7681             :   /* function exit code */
    7682             :   {
    7683         772 :     Py_ssize_t __pyx_temp;
    7684         772 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7685             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7686             :     }
    7687             :   }
    7688             :   __Pyx_RefNannyFinishContext();
    7689             :   return __pyx_r;
    7690             : }
    7691             : 
    7692         772 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
    7693         772 :   int __pyx_r;
    7694             :   __Pyx_RefNannyDeclarations
    7695         772 :   int __pyx_t_1;
    7696         772 :   int __pyx_t_2;
    7697         772 :   int __pyx_t_3;
    7698         772 :   Py_intptr_t __pyx_t_4;
    7699         772 :   size_t __pyx_t_5;
    7700         772 :   int __pyx_lineno = 0;
    7701         772 :   const char *__pyx_filename = NULL;
    7702         772 :   int __pyx_clineno = 0;
    7703         772 :   __Pyx_RefNannySetupContext("__cinit__", 1);
    7704             : 
    7705             :   /* "View.MemoryView":350
    7706             :  * 
    7707             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7708             :  *         self.obj = obj             # <<<<<<<<<<<<<<
    7709             :  *         self.flags = flags
    7710             :  *         if type(self) is memoryview or obj is not None:
    7711             :  */
    7712         772 :   __Pyx_INCREF(__pyx_v_obj);
    7713         772 :   __Pyx_GIVEREF(__pyx_v_obj);
    7714         772 :   __Pyx_GOTREF(__pyx_v_self->obj);
    7715         772 :   __Pyx_DECREF(__pyx_v_self->obj);
    7716         772 :   __pyx_v_self->obj = __pyx_v_obj;
    7717             : 
    7718             :   /* "View.MemoryView":351
    7719             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7720             :  *         self.obj = obj
    7721             :  *         self.flags = flags             # <<<<<<<<<<<<<<
    7722             :  *         if type(self) is memoryview or obj is not None:
    7723             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7724             :  */
    7725         772 :   __pyx_v_self->flags = __pyx_v_flags;
    7726             : 
    7727             :   /* "View.MemoryView":352
    7728             :  *         self.obj = obj
    7729             :  *         self.flags = flags
    7730             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7731             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7732             :  *             if <PyObject *> self.view.obj == NULL:
    7733             :  */
    7734         772 :   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
    7735         772 :   if (!__pyx_t_2) {
    7736           0 :   } else {
    7737         772 :     __pyx_t_1 = __pyx_t_2;
    7738         772 :     goto __pyx_L4_bool_binop_done;
    7739             :   }
    7740           0 :   __pyx_t_2 = (__pyx_v_obj != Py_None);
    7741           0 :   __pyx_t_1 = __pyx_t_2;
    7742         772 :   __pyx_L4_bool_binop_done:;
    7743         772 :   if (__pyx_t_1) {
    7744             : 
    7745             :     /* "View.MemoryView":353
    7746             :  *         self.flags = flags
    7747             :  *         if type(self) is memoryview or obj is not None:
    7748             :  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
    7749             :  *             if <PyObject *> self.view.obj == NULL:
    7750             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7751             :  */
    7752         772 :     __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)
    7753             : 
    7754             :     /* "View.MemoryView":354
    7755             :  *         if type(self) is memoryview or obj is not None:
    7756             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7757             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7758             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7759             :  *                 Py_INCREF(Py_None)
    7760             :  */
    7761         772 :     __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    7762         772 :     if (__pyx_t_1) {
    7763             : 
    7764             :       /* "View.MemoryView":355
    7765             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7766             :  *             if <PyObject *> self.view.obj == NULL:
    7767             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
    7768             :  *                 Py_INCREF(Py_None)
    7769             :  * 
    7770             :  */
    7771           0 :       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
    7772             : 
    7773             :       /* "View.MemoryView":356
    7774             :  *             if <PyObject *> self.view.obj == NULL:
    7775             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7776             :  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    7777             :  * 
    7778             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7779             :  */
    7780           0 :       Py_INCREF(Py_None);
    7781             : 
    7782             :       /* "View.MemoryView":354
    7783             :  *         if type(self) is memoryview or obj is not None:
    7784             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7785             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7786             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7787             :  *                 Py_INCREF(Py_None)
    7788             :  */
    7789             :     }
    7790             : 
    7791             :     /* "View.MemoryView":352
    7792             :  *         self.obj = obj
    7793             :  *         self.flags = flags
    7794             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7795             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7796             :  *             if <PyObject *> self.view.obj == NULL:
    7797             :  */
    7798             :   }
    7799             : 
    7800             :   /* "View.MemoryView":358
    7801             :  *                 Py_INCREF(Py_None)
    7802             :  * 
    7803             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7804             :  *             global __pyx_memoryview_thread_locks_used
    7805             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7806             :  */
    7807         772 :   __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
    7808         772 :   if (__pyx_t_1) {
    7809             : 
    7810             :     /* "View.MemoryView":360
    7811             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7812             :  *             global __pyx_memoryview_thread_locks_used
    7813             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7814             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7815             :  *                 __pyx_memoryview_thread_locks_used += 1
    7816             :  */
    7817             :     __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
    7818             :     if (__pyx_t_1) {
    7819             : 
    7820             :       /* "View.MemoryView":361
    7821             :  *             global __pyx_memoryview_thread_locks_used
    7822             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7823             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
    7824             :  *                 __pyx_memoryview_thread_locks_used += 1
    7825             :  *             if self.lock is NULL:
    7826             :  */
    7827             :       __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    7828             : 
    7829             :       /* "View.MemoryView":362
    7830             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7831             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7832             :  *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
    7833             :  *             if self.lock is NULL:
    7834             :  *                 self.lock = PyThread_allocate_lock()
    7835             :  */
    7836             :       __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
    7837             : 
    7838             :       /* "View.MemoryView":360
    7839             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7840             :  *             global __pyx_memoryview_thread_locks_used
    7841             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7842             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7843             :  *                 __pyx_memoryview_thread_locks_used += 1
    7844             :  */
    7845             :     }
    7846             : 
    7847             :     /* "View.MemoryView":363
    7848             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7849             :  *                 __pyx_memoryview_thread_locks_used += 1
    7850             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7851             :  *                 self.lock = PyThread_allocate_lock()
    7852             :  *                 if self.lock is NULL:
    7853             :  */
    7854             :     __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7855             :     if (__pyx_t_1) {
    7856             : 
    7857             :       /* "View.MemoryView":364
    7858             :  *                 __pyx_memoryview_thread_locks_used += 1
    7859             :  *             if self.lock is NULL:
    7860             :  *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
    7861             :  *                 if self.lock is NULL:
    7862             :  *                     raise MemoryError
    7863             :  */
    7864             :       __pyx_v_self->lock = PyThread_allocate_lock();
    7865             : 
    7866             :       /* "View.MemoryView":365
    7867             :  *             if self.lock is NULL:
    7868             :  *                 self.lock = PyThread_allocate_lock()
    7869             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7870             :  *                     raise MemoryError
    7871             :  * 
    7872             :  */
    7873             :       __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7874             :       if (unlikely(__pyx_t_1)) {
    7875             : 
    7876             :         /* "View.MemoryView":366
    7877             :  *                 self.lock = PyThread_allocate_lock()
    7878             :  *                 if self.lock is NULL:
    7879             :  *                     raise MemoryError             # <<<<<<<<<<<<<<
    7880             :  * 
    7881             :  *         if flags & PyBUF_FORMAT:
    7882             :  */
    7883             :         PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)
    7884             : 
    7885             :         /* "View.MemoryView":365
    7886             :  *             if self.lock is NULL:
    7887             :  *                 self.lock = PyThread_allocate_lock()
    7888             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7889             :  *                     raise MemoryError
    7890             :  * 
    7891             :  */
    7892             :       }
    7893             : 
    7894             :       /* "View.MemoryView":363
    7895             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7896             :  *                 __pyx_memoryview_thread_locks_used += 1
    7897             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7898             :  *                 self.lock = PyThread_allocate_lock()
    7899             :  *                 if self.lock is NULL:
    7900             :  */
    7901             :     }
    7902             : 
    7903             :     /* "View.MemoryView":358
    7904             :  *                 Py_INCREF(Py_None)
    7905             :  * 
    7906             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7907             :  *             global __pyx_memoryview_thread_locks_used
    7908             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7909             :  */
    7910             :   }
    7911             : 
    7912             :   /* "View.MemoryView":368
    7913             :  *                     raise MemoryError
    7914             :  * 
    7915             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7916             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7917             :  *         else:
    7918             :  */
    7919         772 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    7920         772 :   if (__pyx_t_1) {
    7921             : 
    7922             :     /* "View.MemoryView":369
    7923             :  * 
    7924             :  *         if flags & PyBUF_FORMAT:
    7925             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
    7926             :  *         else:
    7927             :  *             self.dtype_is_object = dtype_is_object
    7928             :  */
    7929         772 :     __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    7930         772 :     if (__pyx_t_2) {
    7931           0 :     } else {
    7932         772 :       __pyx_t_1 = __pyx_t_2;
    7933         772 :       goto __pyx_L12_bool_binop_done;
    7934             :     }
    7935           0 :     __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    7936           0 :     __pyx_t_1 = __pyx_t_2;
    7937         772 :     __pyx_L12_bool_binop_done:;
    7938         772 :     __pyx_v_self->dtype_is_object = __pyx_t_1;
    7939             : 
    7940             :     /* "View.MemoryView":368
    7941             :  *                     raise MemoryError
    7942             :  * 
    7943             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7944             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7945             :  *         else:
    7946             :  */
    7947         772 :     goto __pyx_L11;
    7948             :   }
    7949             : 
    7950             :   /* "View.MemoryView":371
    7951             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7952             :  *         else:
    7953             :  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
    7954             :  * 
    7955             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7956             :  */
    7957             :   /*else*/ {
    7958           0 :     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
    7959             :   }
    7960         772 :   __pyx_L11:;
    7961             : 
    7962             :   /* "View.MemoryView":373
    7963             :  *             self.dtype_is_object = dtype_is_object
    7964             :  * 
    7965             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
    7966             :  *         self.typeinfo = NULL
    7967             :  * 
    7968             :  */
    7969             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
    7970         772 :   if (unlikely(__pyx_assertions_enabled())) {
    7971         772 :     __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    7972         772 :     __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    7973         772 :     if (unlikely(__pyx_t_5 == 0)) {
    7974             :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    7975             :       __PYX_ERR(1, 373, __pyx_L1_error)
    7976             :     }
    7977         772 :     __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    7978         772 :     if (unlikely(!__pyx_t_1)) {
    7979           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
    7980           0 :       __PYX_ERR(1, 373, __pyx_L1_error)
    7981             :     }
    7982             :   }
    7983             :   #else
    7984             :   if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
    7985             :   #endif
    7986             : 
    7987             :   /* "View.MemoryView":374
    7988             :  * 
    7989             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7990             :  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
    7991             :  * 
    7992             :  *     def __dealloc__(memoryview self):
    7993             :  */
    7994         772 :   __pyx_v_self->typeinfo = NULL;
    7995             : 
    7996             :   /* "View.MemoryView":349
    7997             :  *     cdef __Pyx_TypeInfo *typeinfo
    7998             :  * 
    7999             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    8000             :  *         self.obj = obj
    8001             :  *         self.flags = flags
    8002             :  */
    8003             : 
    8004             :   /* function exit code */
    8005         772 :   __pyx_r = 0;
    8006         772 :   goto __pyx_L0;
    8007           0 :   __pyx_L1_error:;
    8008           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8009           0 :   __pyx_r = -1;
    8010         772 :   __pyx_L0:;
    8011         772 :   __Pyx_RefNannyFinishContext();
    8012         772 :   return __pyx_r;
    8013             : }
    8014             : 
    8015             : /* "View.MemoryView":376
    8016             :  *         self.typeinfo = NULL
    8017             :  * 
    8018             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8019             :  *         if self.obj is not None:
    8020             :  *             __Pyx_ReleaseBuffer(&self.view)
    8021             :  */
    8022             : 
    8023             : /* Python wrapper */
    8024             : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
    8025         772 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
    8026         772 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8027             :   __Pyx_RefNannyDeclarations
    8028         772 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    8029         772 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8030         772 :   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
    8031             : 
    8032             :   /* function exit code */
    8033         772 :   __Pyx_RefNannyFinishContext();
    8034             : }
    8035             : 
    8036         772 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
    8037         772 :   int __pyx_v_i;
    8038         772 :   int __pyx_t_1;
    8039         772 :   int __pyx_t_2;
    8040         772 :   int __pyx_t_3;
    8041         772 :   int __pyx_t_4;
    8042         772 :   PyThread_type_lock __pyx_t_5;
    8043         772 :   PyThread_type_lock __pyx_t_6;
    8044             : 
    8045             :   /* "View.MemoryView":377
    8046             :  * 
    8047             :  *     def __dealloc__(memoryview self):
    8048             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    8049             :  *             __Pyx_ReleaseBuffer(&self.view)
    8050             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8051             :  */
    8052         772 :   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
    8053         772 :   if (__pyx_t_1) {
    8054             : 
    8055             :     /* "View.MemoryView":378
    8056             :  *     def __dealloc__(memoryview self):
    8057             :  *         if self.obj is not None:
    8058             :  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
    8059             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8060             :  * 
    8061             :  */
    8062         772 :     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
    8063             : 
    8064             :     /* "View.MemoryView":377
    8065             :  * 
    8066             :  *     def __dealloc__(memoryview self):
    8067             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    8068             :  *             __Pyx_ReleaseBuffer(&self.view)
    8069             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8070             :  */
    8071         772 :     goto __pyx_L3;
    8072             :   }
    8073             : 
    8074             :   /* "View.MemoryView":379
    8075             :  *         if self.obj is not None:
    8076             :  *             __Pyx_ReleaseBuffer(&self.view)
    8077             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    8078             :  * 
    8079             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8080             :  */
    8081           0 :   __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
    8082           0 :   if (__pyx_t_1) {
    8083             : 
    8084             :     /* "View.MemoryView":381
    8085             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8086             :  * 
    8087             :  *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
    8088             :  *             Py_DECREF(Py_None)
    8089             :  * 
    8090             :  */
    8091           0 :     ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
    8092             : 
    8093             :     /* "View.MemoryView":382
    8094             :  * 
    8095             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8096             :  *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
    8097             :  * 
    8098             :  *         cdef int i
    8099             :  */
    8100           0 :     Py_DECREF(Py_None);
    8101             : 
    8102             :     /* "View.MemoryView":379
    8103             :  *         if self.obj is not None:
    8104             :  *             __Pyx_ReleaseBuffer(&self.view)
    8105             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    8106             :  * 
    8107             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8108             :  */
    8109             :   }
    8110           0 :   __pyx_L3:;
    8111             : 
    8112             :   /* "View.MemoryView":386
    8113             :  *         cdef int i
    8114             :  *         global __pyx_memoryview_thread_locks_used
    8115             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8116             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8117             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8118             :  */
    8119         772 :   __pyx_t_1 = (__pyx_v_self->lock != NULL);
    8120         772 :   if (__pyx_t_1) {
    8121             : 
    8122             :     /* "View.MemoryView":387
    8123             :  *         global __pyx_memoryview_thread_locks_used
    8124             :  *         if self.lock != NULL:
    8125             :  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
    8126             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8127             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8128             :  */
    8129           0 :     __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    8130           0 :     __pyx_t_3 = __pyx_t_2;
    8131           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    8132           0 :       __pyx_v_i = __pyx_t_4;
    8133             : 
    8134             :       /* "View.MemoryView":388
    8135             :  *         if self.lock != NULL:
    8136             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8137             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    8138             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8139             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8140             :  */
    8141           0 :       __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
    8142           0 :       if (__pyx_t_1) {
    8143             : 
    8144             :         /* "View.MemoryView":389
    8145             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8146             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8147             :  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
    8148             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8149             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8150             :  */
    8151           0 :         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
    8152             : 
    8153             :         /* "View.MemoryView":390
    8154             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8155             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8156             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    8157             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8158             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8159             :  */
    8160           0 :         __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
    8161           0 :         if (__pyx_t_1) {
    8162             : 
    8163             :           /* "View.MemoryView":392
    8164             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8165             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8166             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
    8167             :  *                     break
    8168             :  *             else:
    8169             :  */
    8170           0 :           __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    8171           0 :           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
    8172             : 
    8173             :           /* "View.MemoryView":391
    8174             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8175             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8176             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
    8177             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8178             :  *                     break
    8179             :  */
    8180           0 :           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
    8181           0 :           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
    8182             : 
    8183             :           /* "View.MemoryView":390
    8184             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8185             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8186             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    8187             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8188             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8189             :  */
    8190             :         }
    8191             : 
    8192             :         /* "View.MemoryView":393
    8193             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8194             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8195             :  *                     break             # <<<<<<<<<<<<<<
    8196             :  *             else:
    8197             :  *                 PyThread_free_lock(self.lock)
    8198             :  */
    8199           0 :         goto __pyx_L6_break;
    8200             : 
    8201             :         /* "View.MemoryView":388
    8202             :  *         if self.lock != NULL:
    8203             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8204             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    8205             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8206             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8207             :  */
    8208             :       }
    8209             :     }
    8210             :     /*else*/ {
    8211             : 
    8212             :       /* "View.MemoryView":395
    8213             :  *                     break
    8214             :  *             else:
    8215             :  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
    8216             :  * 
    8217             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8218             :  */
    8219           0 :       PyThread_free_lock(__pyx_v_self->lock);
    8220             :     }
    8221         772 :     __pyx_L6_break:;
    8222             : 
    8223             :     /* "View.MemoryView":386
    8224             :  *         cdef int i
    8225             :  *         global __pyx_memoryview_thread_locks_used
    8226             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8227             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8228             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8229             :  */
    8230             :   }
    8231             : 
    8232             :   /* "View.MemoryView":376
    8233             :  *         self.typeinfo = NULL
    8234             :  * 
    8235             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8236             :  *         if self.obj is not None:
    8237             :  *             __Pyx_ReleaseBuffer(&self.view)
    8238             :  */
    8239             : 
    8240             :   /* function exit code */
    8241         772 : }
    8242             : 
    8243             : /* "View.MemoryView":397
    8244             :  *                 PyThread_free_lock(self.lock)
    8245             :  * 
    8246             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8247             :  *         cdef Py_ssize_t dim
    8248             :  *         cdef char *itemp = <char *> self.view.buf
    8249             :  */
    8250             : 
    8251           0 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8252           0 :   Py_ssize_t __pyx_v_dim;
    8253           0 :   char *__pyx_v_itemp;
    8254           0 :   PyObject *__pyx_v_idx = NULL;
    8255           0 :   char *__pyx_r;
    8256             :   __Pyx_RefNannyDeclarations
    8257           0 :   Py_ssize_t __pyx_t_1;
    8258           0 :   PyObject *__pyx_t_2 = NULL;
    8259           0 :   Py_ssize_t __pyx_t_3;
    8260           0 :   PyObject *(*__pyx_t_4)(PyObject *);
    8261           0 :   PyObject *__pyx_t_5 = NULL;
    8262           0 :   Py_ssize_t __pyx_t_6;
    8263           0 :   char *__pyx_t_7;
    8264           0 :   int __pyx_lineno = 0;
    8265           0 :   const char *__pyx_filename = NULL;
    8266           0 :   int __pyx_clineno = 0;
    8267           0 :   __Pyx_RefNannySetupContext("get_item_pointer", 1);
    8268             : 
    8269             :   /* "View.MemoryView":399
    8270             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8271             :  *         cdef Py_ssize_t dim
    8272             :  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
    8273             :  * 
    8274             :  *         for dim, idx in enumerate(index):
    8275             :  */
    8276           0 :   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
    8277             : 
    8278             :   /* "View.MemoryView":401
    8279             :  *         cdef char *itemp = <char *> self.view.buf
    8280             :  * 
    8281             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8282             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8283             :  * 
    8284             :  */
    8285           0 :   __pyx_t_1 = 0;
    8286           0 :   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    8287           0 :     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    8288           0 :     __pyx_t_3 = 0;
    8289           0 :     __pyx_t_4 = NULL;
    8290             :   } else {
    8291           0 :     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
    8292           0 :     __Pyx_GOTREF(__pyx_t_2);
    8293           0 :     __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
    8294             :   }
    8295           0 :   for (;;) {
    8296           0 :     if (likely(!__pyx_t_4)) {
    8297           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
    8298             :         {
    8299           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
    8300             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8301             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8302             :           #endif
    8303           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8304             :         }
    8305             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8306           0 :         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8307             :         #else
    8308             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8309             :         __Pyx_GOTREF(__pyx_t_5);
    8310             :         #endif
    8311             :       } else {
    8312             :         {
    8313           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
    8314             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8315             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8316             :           #endif
    8317           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8318             :         }
    8319             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8320           0 :         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8321             :         #else
    8322             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8323             :         __Pyx_GOTREF(__pyx_t_5);
    8324             :         #endif
    8325             :       }
    8326             :     } else {
    8327           0 :       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
    8328           0 :       if (unlikely(!__pyx_t_5)) {
    8329           0 :         PyObject* exc_type = PyErr_Occurred();
    8330           0 :         if (exc_type) {
    8331           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
    8332           0 :           else __PYX_ERR(1, 401, __pyx_L1_error)
    8333             :         }
    8334             :         break;
    8335             :       }
    8336           0 :       __Pyx_GOTREF(__pyx_t_5);
    8337             :     }
    8338           0 :     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    8339           0 :     __pyx_t_5 = 0;
    8340           0 :     __pyx_v_dim = __pyx_t_1;
    8341           0 :     __pyx_t_1 = (__pyx_t_1 + 1);
    8342             : 
    8343             :     /* "View.MemoryView":402
    8344             :  * 
    8345             :  *         for dim, idx in enumerate(index):
    8346             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
    8347             :  * 
    8348             :  *         return itemp
    8349             :  */
    8350           0 :     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    8351           0 :     __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
    8352             :     __pyx_v_itemp = __pyx_t_7;
    8353             : 
    8354             :     /* "View.MemoryView":401
    8355             :  *         cdef char *itemp = <char *> self.view.buf
    8356             :  * 
    8357             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8358             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8359             :  * 
    8360             :  */
    8361             :   }
    8362           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8363             : 
    8364             :   /* "View.MemoryView":404
    8365             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8366             :  * 
    8367             :  *         return itemp             # <<<<<<<<<<<<<<
    8368             :  * 
    8369             :  * 
    8370             :  */
    8371           0 :   __pyx_r = __pyx_v_itemp;
    8372           0 :   goto __pyx_L0;
    8373             : 
    8374             :   /* "View.MemoryView":397
    8375             :  *                 PyThread_free_lock(self.lock)
    8376             :  * 
    8377             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8378             :  *         cdef Py_ssize_t dim
    8379             :  *         cdef char *itemp = <char *> self.view.buf
    8380             :  */
    8381             : 
    8382             :   /* function exit code */
    8383           0 :   __pyx_L1_error:;
    8384           0 :   __Pyx_XDECREF(__pyx_t_2);
    8385           0 :   __Pyx_XDECREF(__pyx_t_5);
    8386           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8387           0 :   __pyx_r = NULL;
    8388           0 :   __pyx_L0:;
    8389           0 :   __Pyx_XDECREF(__pyx_v_idx);
    8390           0 :   __Pyx_RefNannyFinishContext();
    8391           0 :   return __pyx_r;
    8392             : }
    8393             : 
    8394             : /* "View.MemoryView":407
    8395             :  * 
    8396             :  * 
    8397             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8398             :  *         if index is Ellipsis:
    8399             :  *             return self
    8400             :  */
    8401             : 
    8402             : /* Python wrapper */
    8403             : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
    8404           0 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
    8405           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8406           0 :   PyObject *__pyx_r = 0;
    8407             :   __Pyx_RefNannyDeclarations
    8408           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    8409           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8410           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
    8411             : 
    8412             :   /* function exit code */
    8413           0 :   __Pyx_RefNannyFinishContext();
    8414           0 :   return __pyx_r;
    8415             : }
    8416             : 
    8417           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8418           0 :   PyObject *__pyx_v_have_slices = NULL;
    8419           0 :   PyObject *__pyx_v_indices = NULL;
    8420           0 :   char *__pyx_v_itemp;
    8421           0 :   PyObject *__pyx_r = NULL;
    8422             :   __Pyx_RefNannyDeclarations
    8423           0 :   int __pyx_t_1;
    8424           0 :   PyObject *__pyx_t_2 = NULL;
    8425           0 :   PyObject *__pyx_t_3 = NULL;
    8426           0 :   PyObject *__pyx_t_4 = NULL;
    8427           0 :   char *__pyx_t_5;
    8428           0 :   int __pyx_lineno = 0;
    8429           0 :   const char *__pyx_filename = NULL;
    8430           0 :   int __pyx_clineno = 0;
    8431           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    8432             : 
    8433             :   /* "View.MemoryView":408
    8434             :  * 
    8435             :  *     def __getitem__(memoryview self, object index):
    8436             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8437             :  *             return self
    8438             :  * 
    8439             :  */
    8440           0 :   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
    8441           0 :   if (__pyx_t_1) {
    8442             : 
    8443             :     /* "View.MemoryView":409
    8444             :  *     def __getitem__(memoryview self, object index):
    8445             :  *         if index is Ellipsis:
    8446             :  *             return self             # <<<<<<<<<<<<<<
    8447             :  * 
    8448             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)
    8449             :  */
    8450           0 :     __Pyx_XDECREF(__pyx_r);
    8451           0 :     __Pyx_INCREF((PyObject *)__pyx_v_self);
    8452           0 :     __pyx_r = ((PyObject *)__pyx_v_self);
    8453           0 :     goto __pyx_L0;
    8454             : 
    8455             :     /* "View.MemoryView":408
    8456             :  * 
    8457             :  *     def __getitem__(memoryview self, object index):
    8458             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8459             :  *             return self
    8460             :  * 
    8461             :  */
    8462             :   }
    8463             : 
    8464             :   /* "View.MemoryView":411
    8465             :  *             return self
    8466             :  * 
    8467             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8468             :  * 
    8469             :  *         cdef char *itemp
    8470             :  */
    8471           0 :   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
    8472           0 :   __Pyx_GOTREF(__pyx_t_2);
    8473           0 :   if (likely(__pyx_t_2 != Py_None)) {
    8474           0 :     PyObject* sequence = __pyx_t_2;
    8475           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8476           0 :     if (unlikely(size != 2)) {
    8477           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8478           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8479           0 :       __PYX_ERR(1, 411, __pyx_L1_error)
    8480             :     }
    8481             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8482           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    8483           0 :     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    8484           0 :     __Pyx_INCREF(__pyx_t_3);
    8485           0 :     __Pyx_INCREF(__pyx_t_4);
    8486             :     #else
    8487             :     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
    8488             :     __Pyx_GOTREF(__pyx_t_3);
    8489             :     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
    8490             :     __Pyx_GOTREF(__pyx_t_4);
    8491             :     #endif
    8492           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8493             :   } else {
    8494           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
    8495             :   }
    8496           0 :   __pyx_v_have_slices = __pyx_t_3;
    8497           0 :   __pyx_t_3 = 0;
    8498           0 :   __pyx_v_indices = __pyx_t_4;
    8499           0 :   __pyx_t_4 = 0;
    8500             : 
    8501             :   /* "View.MemoryView":414
    8502             :  * 
    8503             :  *         cdef char *itemp
    8504             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8505             :  *             return memview_slice(self, indices)
    8506             :  *         else:
    8507             :  */
    8508           0 :   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
    8509           0 :   if (__pyx_t_1) {
    8510             : 
    8511             :     /* "View.MemoryView":415
    8512             :  *         cdef char *itemp
    8513             :  *         if have_slices:
    8514             :  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
    8515             :  *         else:
    8516             :  *             itemp = self.get_item_pointer(indices)
    8517             :  */
    8518           0 :     __Pyx_XDECREF(__pyx_r);
    8519           0 :     __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    8520           0 :     __Pyx_GOTREF(__pyx_t_2);
    8521           0 :     __pyx_r = __pyx_t_2;
    8522           0 :     __pyx_t_2 = 0;
    8523           0 :     goto __pyx_L0;
    8524             : 
    8525             :     /* "View.MemoryView":414
    8526             :  * 
    8527             :  *         cdef char *itemp
    8528             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8529             :  *             return memview_slice(self, indices)
    8530             :  *         else:
    8531             :  */
    8532             :   }
    8533             : 
    8534             :   /* "View.MemoryView":417
    8535             :  *             return memview_slice(self, indices)
    8536             :  *         else:
    8537             :  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
    8538             :  *             return self.convert_item_to_object(itemp)
    8539             :  * 
    8540             :  */
    8541             :   /*else*/ {
    8542           0 :     __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
    8543           0 :     __pyx_v_itemp = __pyx_t_5;
    8544             : 
    8545             :     /* "View.MemoryView":418
    8546             :  *         else:
    8547             :  *             itemp = self.get_item_pointer(indices)
    8548             :  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
    8549             :  * 
    8550             :  *     def __setitem__(memoryview self, object index, object value):
    8551             :  */
    8552           0 :     __Pyx_XDECREF(__pyx_r);
    8553           0 :     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
    8554           0 :     __Pyx_GOTREF(__pyx_t_2);
    8555           0 :     __pyx_r = __pyx_t_2;
    8556           0 :     __pyx_t_2 = 0;
    8557           0 :     goto __pyx_L0;
    8558             :   }
    8559             : 
    8560             :   /* "View.MemoryView":407
    8561             :  * 
    8562             :  * 
    8563             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8564             :  *         if index is Ellipsis:
    8565             :  *             return self
    8566             :  */
    8567             : 
    8568             :   /* function exit code */
    8569           0 :   __pyx_L1_error:;
    8570           0 :   __Pyx_XDECREF(__pyx_t_2);
    8571           0 :   __Pyx_XDECREF(__pyx_t_3);
    8572           0 :   __Pyx_XDECREF(__pyx_t_4);
    8573           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8574           0 :   __pyx_r = NULL;
    8575           0 :   __pyx_L0:;
    8576           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8577           0 :   __Pyx_XDECREF(__pyx_v_indices);
    8578           0 :   __Pyx_XGIVEREF(__pyx_r);
    8579           0 :   __Pyx_RefNannyFinishContext();
    8580           0 :   return __pyx_r;
    8581             : }
    8582             : 
    8583             : /* "View.MemoryView":420
    8584             :  *             return self.convert_item_to_object(itemp)
    8585             :  * 
    8586             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8587             :  *         if self.view.readonly:
    8588             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8589             :  */
    8590             : 
    8591             : /* Python wrapper */
    8592             : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
    8593           0 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8594           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8595           0 :   int __pyx_r;
    8596             :   __Pyx_RefNannyDeclarations
    8597           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    8598           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8599           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
    8600             : 
    8601             :   /* function exit code */
    8602           0 :   __Pyx_RefNannyFinishContext();
    8603           0 :   return __pyx_r;
    8604             : }
    8605             : 
    8606           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8607           0 :   PyObject *__pyx_v_have_slices = NULL;
    8608           0 :   PyObject *__pyx_v_obj = NULL;
    8609           0 :   int __pyx_r;
    8610             :   __Pyx_RefNannyDeclarations
    8611           0 :   PyObject *__pyx_t_1 = NULL;
    8612           0 :   PyObject *__pyx_t_2 = NULL;
    8613           0 :   PyObject *__pyx_t_3 = NULL;
    8614           0 :   int __pyx_t_4;
    8615           0 :   int __pyx_lineno = 0;
    8616           0 :   const char *__pyx_filename = NULL;
    8617           0 :   int __pyx_clineno = 0;
    8618           0 :   __Pyx_RefNannySetupContext("__setitem__", 0);
    8619           0 :   __Pyx_INCREF(__pyx_v_index);
    8620             : 
    8621             :   /* "View.MemoryView":421
    8622             :  * 
    8623             :  *     def __setitem__(memoryview self, object index, object value):
    8624             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8625             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8626             :  * 
    8627             :  */
    8628           0 :   if (unlikely(__pyx_v_self->view.readonly)) {
    8629             : 
    8630             :     /* "View.MemoryView":422
    8631             :  *     def __setitem__(memoryview self, object index, object value):
    8632             :  *         if self.view.readonly:
    8633             :  *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
    8634             :  * 
    8635             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8636             :  */
    8637           0 :     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
    8638           0 :     __PYX_ERR(1, 422, __pyx_L1_error)
    8639             : 
    8640             :     /* "View.MemoryView":421
    8641             :  * 
    8642             :  *     def __setitem__(memoryview self, object index, object value):
    8643             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8644             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8645             :  * 
    8646             :  */
    8647             :   }
    8648             : 
    8649             :   /* "View.MemoryView":424
    8650             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8651             :  * 
    8652             :  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8653             :  * 
    8654             :  *         if have_slices:
    8655             :  */
    8656           0 :   __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
    8657           0 :   __Pyx_GOTREF(__pyx_t_1);
    8658           0 :   if (likely(__pyx_t_1 != Py_None)) {
    8659           0 :     PyObject* sequence = __pyx_t_1;
    8660           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8661           0 :     if (unlikely(size != 2)) {
    8662           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8663           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8664           0 :       __PYX_ERR(1, 424, __pyx_L1_error)
    8665             :     }
    8666             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8667           0 :     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    8668           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    8669           0 :     __Pyx_INCREF(__pyx_t_2);
    8670           0 :     __Pyx_INCREF(__pyx_t_3);
    8671             :     #else
    8672             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
    8673             :     __Pyx_GOTREF(__pyx_t_2);
    8674             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
    8675             :     __Pyx_GOTREF(__pyx_t_3);
    8676             :     #endif
    8677           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8678             :   } else {
    8679           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
    8680             :   }
    8681           0 :   __pyx_v_have_slices = __pyx_t_2;
    8682           0 :   __pyx_t_2 = 0;
    8683           0 :   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    8684           0 :   __pyx_t_3 = 0;
    8685             : 
    8686             :   /* "View.MemoryView":426
    8687             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8688             :  * 
    8689             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8690             :  *             obj = self.is_slice(value)
    8691             :  *             if obj is not None:
    8692             :  */
    8693           0 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
    8694           0 :   if (__pyx_t_4) {
    8695             : 
    8696             :     /* "View.MemoryView":427
    8697             :  * 
    8698             :  *         if have_slices:
    8699             :  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
    8700             :  *             if obj is not None:
    8701             :  *                 self.setitem_slice_assignment(self[index], obj)
    8702             :  */
    8703           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
    8704           0 :     __Pyx_GOTREF(__pyx_t_1);
    8705           0 :     __pyx_v_obj = __pyx_t_1;
    8706           0 :     __pyx_t_1 = 0;
    8707             : 
    8708             :     /* "View.MemoryView":428
    8709             :  *         if have_slices:
    8710             :  *             obj = self.is_slice(value)
    8711             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8712             :  *                 self.setitem_slice_assignment(self[index], obj)
    8713             :  *             else:
    8714             :  */
    8715           0 :     __pyx_t_4 = (__pyx_v_obj != Py_None);
    8716           0 :     if (__pyx_t_4) {
    8717             : 
    8718             :       /* "View.MemoryView":429
    8719             :  *             obj = self.is_slice(value)
    8720             :  *             if obj is not None:
    8721             :  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
    8722             :  *             else:
    8723             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8724             :  */
    8725           0 :       __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
    8726           0 :       __Pyx_GOTREF(__pyx_t_1);
    8727           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
    8728           0 :       __Pyx_GOTREF(__pyx_t_3);
    8729           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8730           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8731             : 
    8732             :       /* "View.MemoryView":428
    8733             :  *         if have_slices:
    8734             :  *             obj = self.is_slice(value)
    8735             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8736             :  *                 self.setitem_slice_assignment(self[index], obj)
    8737             :  *             else:
    8738             :  */
    8739           0 :       goto __pyx_L5;
    8740             :     }
    8741             : 
    8742             :     /* "View.MemoryView":431
    8743             :  *                 self.setitem_slice_assignment(self[index], obj)
    8744             :  *             else:
    8745             :  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
    8746             :  *         else:
    8747             :  *             self.setitem_indexed(index, value)
    8748             :  */
    8749             :     /*else*/ {
    8750           0 :       __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
    8751           0 :       __Pyx_GOTREF(__pyx_t_3);
    8752           0 :       if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
    8753           0 :       __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
    8754           0 :       __Pyx_GOTREF(__pyx_t_1);
    8755           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8756           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8757             :     }
    8758           0 :     __pyx_L5:;
    8759             : 
    8760             :     /* "View.MemoryView":426
    8761             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8762             :  * 
    8763             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8764             :  *             obj = self.is_slice(value)
    8765             :  *             if obj is not None:
    8766             :  */
    8767           0 :     goto __pyx_L4;
    8768             :   }
    8769             : 
    8770             :   /* "View.MemoryView":433
    8771             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8772             :  *         else:
    8773             :  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
    8774             :  * 
    8775             :  *     cdef is_slice(self, obj):
    8776             :  */
    8777             :   /*else*/ {
    8778           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
    8779           0 :     __Pyx_GOTREF(__pyx_t_1);
    8780           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8781             :   }
    8782           0 :   __pyx_L4:;
    8783             : 
    8784             :   /* "View.MemoryView":420
    8785             :  *             return self.convert_item_to_object(itemp)
    8786             :  * 
    8787             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8788             :  *         if self.view.readonly:
    8789             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8790             :  */
    8791             : 
    8792             :   /* function exit code */
    8793           0 :   __pyx_r = 0;
    8794           0 :   goto __pyx_L0;
    8795           0 :   __pyx_L1_error:;
    8796           0 :   __Pyx_XDECREF(__pyx_t_1);
    8797           0 :   __Pyx_XDECREF(__pyx_t_2);
    8798           0 :   __Pyx_XDECREF(__pyx_t_3);
    8799           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8800           0 :   __pyx_r = -1;
    8801           0 :   __pyx_L0:;
    8802           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8803           0 :   __Pyx_XDECREF(__pyx_v_obj);
    8804           0 :   __Pyx_XDECREF(__pyx_v_index);
    8805           0 :   __Pyx_RefNannyFinishContext();
    8806           0 :   return __pyx_r;
    8807             : }
    8808             : 
    8809             : /* "View.MemoryView":435
    8810             :  *             self.setitem_indexed(index, value)
    8811             :  * 
    8812             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    8813             :  *         if not isinstance(obj, memoryview):
    8814             :  *             try:
    8815             :  */
    8816             : 
    8817           0 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
    8818           0 :   PyObject *__pyx_r = NULL;
    8819             :   __Pyx_RefNannyDeclarations
    8820           0 :   int __pyx_t_1;
    8821           0 :   int __pyx_t_2;
    8822           0 :   PyObject *__pyx_t_3 = NULL;
    8823           0 :   PyObject *__pyx_t_4 = NULL;
    8824           0 :   PyObject *__pyx_t_5 = NULL;
    8825           0 :   PyObject *__pyx_t_6 = NULL;
    8826           0 :   PyObject *__pyx_t_7 = NULL;
    8827           0 :   PyObject *__pyx_t_8 = NULL;
    8828           0 :   int __pyx_t_9;
    8829           0 :   int __pyx_lineno = 0;
    8830           0 :   const char *__pyx_filename = NULL;
    8831           0 :   int __pyx_clineno = 0;
    8832           0 :   __Pyx_RefNannySetupContext("is_slice", 0);
    8833           0 :   __Pyx_INCREF(__pyx_v_obj);
    8834             : 
    8835             :   /* "View.MemoryView":436
    8836             :  * 
    8837             :  *     cdef is_slice(self, obj):
    8838             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8839             :  *             try:
    8840             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8841             :  */
    8842           0 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
    8843           0 :   __pyx_t_2 = (!__pyx_t_1);
    8844           0 :   if (__pyx_t_2) {
    8845             : 
    8846             :     /* "View.MemoryView":437
    8847             :  *     cdef is_slice(self, obj):
    8848             :  *         if not isinstance(obj, memoryview):
    8849             :  *             try:             # <<<<<<<<<<<<<<
    8850             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8851             :  *                                  self.dtype_is_object)
    8852             :  */
    8853             :     {
    8854           0 :       __Pyx_PyThreadState_declare
    8855           0 :       __Pyx_PyThreadState_assign
    8856           0 :       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    8857           0 :       __Pyx_XGOTREF(__pyx_t_3);
    8858           0 :       __Pyx_XGOTREF(__pyx_t_4);
    8859           0 :       __Pyx_XGOTREF(__pyx_t_5);
    8860             :       /*try:*/ {
    8861             : 
    8862             :         /* "View.MemoryView":438
    8863             :  *         if not isinstance(obj, memoryview):
    8864             :  *             try:
    8865             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8866             :  *                                  self.dtype_is_object)
    8867             :  *             except TypeError:
    8868             :  */
    8869           0 :         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
    8870           0 :         __Pyx_GOTREF(__pyx_t_6);
    8871             : 
    8872             :         /* "View.MemoryView":439
    8873             :  *             try:
    8874             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8875             :  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
    8876             :  *             except TypeError:
    8877             :  *                 return None
    8878             :  */
    8879           0 :         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
    8880           0 :         __Pyx_GOTREF(__pyx_t_7);
    8881             : 
    8882             :         /* "View.MemoryView":438
    8883             :  *         if not isinstance(obj, memoryview):
    8884             :  *             try:
    8885             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8886             :  *                                  self.dtype_is_object)
    8887             :  *             except TypeError:
    8888             :  */
    8889           0 :         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
    8890           0 :         __Pyx_GOTREF(__pyx_t_8);
    8891           0 :         __Pyx_INCREF(__pyx_v_obj);
    8892           0 :         __Pyx_GIVEREF(__pyx_v_obj);
    8893           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
    8894           0 :         __Pyx_GIVEREF(__pyx_t_6);
    8895           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
    8896           0 :         __Pyx_GIVEREF(__pyx_t_7);
    8897           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
    8898           0 :         __pyx_t_6 = 0;
    8899           0 :         __pyx_t_7 = 0;
    8900           0 :         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
    8901           0 :         __Pyx_GOTREF(__pyx_t_7);
    8902           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8903           0 :         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
    8904           0 :         __pyx_t_7 = 0;
    8905             : 
    8906             :         /* "View.MemoryView":437
    8907             :  *     cdef is_slice(self, obj):
    8908             :  *         if not isinstance(obj, memoryview):
    8909             :  *             try:             # <<<<<<<<<<<<<<
    8910             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8911             :  *                                  self.dtype_is_object)
    8912             :  */
    8913             :       }
    8914           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    8915           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    8916           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    8917           0 :       goto __pyx_L9_try_end;
    8918           0 :       __pyx_L4_error:;
    8919           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    8920           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    8921           0 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    8922             : 
    8923             :       /* "View.MemoryView":440
    8924             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8925             :  *                                  self.dtype_is_object)
    8926             :  *             except TypeError:             # <<<<<<<<<<<<<<
    8927             :  *                 return None
    8928             :  * 
    8929             :  */
    8930           0 :       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    8931           0 :       if (__pyx_t_9) {
    8932           0 :         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8933           0 :         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
    8934           0 :         __Pyx_XGOTREF(__pyx_t_7);
    8935           0 :         __Pyx_XGOTREF(__pyx_t_8);
    8936           0 :         __Pyx_XGOTREF(__pyx_t_6);
    8937             : 
    8938             :         /* "View.MemoryView":441
    8939             :  *                                  self.dtype_is_object)
    8940             :  *             except TypeError:
    8941             :  *                 return None             # <<<<<<<<<<<<<<
    8942             :  * 
    8943             :  *         return obj
    8944             :  */
    8945           0 :         __Pyx_XDECREF(__pyx_r);
    8946           0 :         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    8947           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    8948           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    8949           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8950           0 :         goto __pyx_L7_except_return;
    8951             :       }
    8952           0 :       goto __pyx_L6_except_error;
    8953             : 
    8954             :       /* "View.MemoryView":437
    8955             :  *     cdef is_slice(self, obj):
    8956             :  *         if not isinstance(obj, memoryview):
    8957             :  *             try:             # <<<<<<<<<<<<<<
    8958             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8959             :  *                                  self.dtype_is_object)
    8960             :  */
    8961           0 :       __pyx_L6_except_error:;
    8962           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8963           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8964           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8965           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8966           0 :       goto __pyx_L1_error;
    8967           0 :       __pyx_L7_except_return:;
    8968           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8969           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8970           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8971           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8972           0 :       goto __pyx_L0;
    8973           0 :       __pyx_L9_try_end:;
    8974             :     }
    8975             : 
    8976             :     /* "View.MemoryView":436
    8977             :  * 
    8978             :  *     cdef is_slice(self, obj):
    8979             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8980             :  *             try:
    8981             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8982             :  */
    8983             :   }
    8984             : 
    8985             :   /* "View.MemoryView":443
    8986             :  *                 return None
    8987             :  * 
    8988             :  *         return obj             # <<<<<<<<<<<<<<
    8989             :  * 
    8990             :  *     cdef setitem_slice_assignment(self, dst, src):
    8991             :  */
    8992           0 :   __Pyx_XDECREF(__pyx_r);
    8993           0 :   __Pyx_INCREF(__pyx_v_obj);
    8994           0 :   __pyx_r = __pyx_v_obj;
    8995           0 :   goto __pyx_L0;
    8996             : 
    8997             :   /* "View.MemoryView":435
    8998             :  *             self.setitem_indexed(index, value)
    8999             :  * 
    9000             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    9001             :  *         if not isinstance(obj, memoryview):
    9002             :  *             try:
    9003             :  */
    9004             : 
    9005             :   /* function exit code */
    9006           0 :   __pyx_L1_error:;
    9007           0 :   __Pyx_XDECREF(__pyx_t_6);
    9008           0 :   __Pyx_XDECREF(__pyx_t_7);
    9009           0 :   __Pyx_XDECREF(__pyx_t_8);
    9010           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9011           0 :   __pyx_r = 0;
    9012           0 :   __pyx_L0:;
    9013           0 :   __Pyx_XDECREF(__pyx_v_obj);
    9014           0 :   __Pyx_XGIVEREF(__pyx_r);
    9015           0 :   __Pyx_RefNannyFinishContext();
    9016           0 :   return __pyx_r;
    9017             : }
    9018             : 
    9019             : /* "View.MemoryView":445
    9020             :  *         return obj
    9021             :  * 
    9022             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    9023             :  *         cdef __Pyx_memviewslice dst_slice
    9024             :  *         cdef __Pyx_memviewslice src_slice
    9025             :  */
    9026             : 
    9027           0 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
    9028           0 :   __Pyx_memviewslice __pyx_v_dst_slice;
    9029           0 :   __Pyx_memviewslice __pyx_v_src_slice;
    9030           0 :   __Pyx_memviewslice __pyx_v_msrc;
    9031           0 :   __Pyx_memviewslice __pyx_v_mdst;
    9032           0 :   PyObject *__pyx_r = NULL;
    9033             :   __Pyx_RefNannyDeclarations
    9034           0 :   __Pyx_memviewslice *__pyx_t_1;
    9035           0 :   PyObject *__pyx_t_2 = NULL;
    9036           0 :   int __pyx_t_3;
    9037           0 :   int __pyx_t_4;
    9038           0 :   int __pyx_t_5;
    9039           0 :   int __pyx_lineno = 0;
    9040           0 :   const char *__pyx_filename = NULL;
    9041           0 :   int __pyx_clineno = 0;
    9042           0 :   __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);
    9043             : 
    9044             :   /* "View.MemoryView":448
    9045             :  *         cdef __Pyx_memviewslice dst_slice
    9046             :  *         cdef __Pyx_memviewslice src_slice
    9047             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
    9048             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    9049             :  * 
    9050             :  */
    9051           0 :   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
    9052           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
    9053           0 :   __pyx_v_msrc = (__pyx_t_1[0]);
    9054             : 
    9055             :   /* "View.MemoryView":449
    9056             :  *         cdef __Pyx_memviewslice src_slice
    9057             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
    9058             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
    9059             :  * 
    9060             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9061             :  */
    9062           0 :   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
    9063           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
    9064           0 :   __pyx_v_mdst = (__pyx_t_1[0]);
    9065             : 
    9066             :   /* "View.MemoryView":451
    9067             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    9068             :  * 
    9069             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
    9070             :  * 
    9071             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    9072             :  */
    9073           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    9074           0 :   __Pyx_GOTREF(__pyx_t_2);
    9075           0 :   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    9076           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9077           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    9078           0 :   __Pyx_GOTREF(__pyx_t_2);
    9079           0 :   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    9080           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9081           0 :   __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)
    9082             : 
    9083             :   /* "View.MemoryView":445
    9084             :  *         return obj
    9085             :  * 
    9086             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    9087             :  *         cdef __Pyx_memviewslice dst_slice
    9088             :  *         cdef __Pyx_memviewslice src_slice
    9089             :  */
    9090             : 
    9091             :   /* function exit code */
    9092           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9093           0 :   goto __pyx_L0;
    9094           0 :   __pyx_L1_error:;
    9095           0 :   __Pyx_XDECREF(__pyx_t_2);
    9096           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9097           0 :   __pyx_r = 0;
    9098           0 :   __pyx_L0:;
    9099           0 :   __Pyx_XGIVEREF(__pyx_r);
    9100           0 :   __Pyx_RefNannyFinishContext();
    9101           0 :   return __pyx_r;
    9102             : }
    9103             : 
    9104             : /* "View.MemoryView":453
    9105             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9106             :  * 
    9107             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9108             :  *         cdef int array[128]
    9109             :  *         cdef void *tmp = NULL
    9110             :  */
    9111             : 
    9112           0 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
    9113           0 :   int __pyx_v_array[0x80];
    9114           0 :   void *__pyx_v_tmp;
    9115           0 :   void *__pyx_v_item;
    9116           0 :   __Pyx_memviewslice *__pyx_v_dst_slice;
    9117           0 :   __Pyx_memviewslice __pyx_v_tmp_slice;
    9118           0 :   PyObject *__pyx_r = NULL;
    9119             :   __Pyx_RefNannyDeclarations
    9120           0 :   __Pyx_memviewslice *__pyx_t_1;
    9121           0 :   int __pyx_t_2;
    9122           0 :   PyObject *__pyx_t_3 = NULL;
    9123           0 :   int __pyx_t_4;
    9124           0 :   int __pyx_t_5;
    9125           0 :   char const *__pyx_t_6;
    9126           0 :   PyObject *__pyx_t_7 = NULL;
    9127           0 :   PyObject *__pyx_t_8 = NULL;
    9128           0 :   PyObject *__pyx_t_9 = NULL;
    9129           0 :   PyObject *__pyx_t_10 = NULL;
    9130           0 :   PyObject *__pyx_t_11 = NULL;
    9131           0 :   PyObject *__pyx_t_12 = NULL;
    9132           0 :   int __pyx_lineno = 0;
    9133           0 :   const char *__pyx_filename = NULL;
    9134           0 :   int __pyx_clineno = 0;
    9135           0 :   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);
    9136             : 
    9137             :   /* "View.MemoryView":455
    9138             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    9139             :  *         cdef int array[128]
    9140             :  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
    9141             :  *         cdef void *item
    9142             :  * 
    9143             :  */
    9144           0 :   __pyx_v_tmp = NULL;
    9145             : 
    9146             :   /* "View.MemoryView":460
    9147             :  *         cdef __Pyx_memviewslice *dst_slice
    9148             :  *         cdef __Pyx_memviewslice tmp_slice
    9149             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
    9150             :  * 
    9151             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9152             :  */
    9153           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
    9154           0 :   __pyx_v_dst_slice = __pyx_t_1;
    9155             : 
    9156             :   /* "View.MemoryView":462
    9157             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9158             :  * 
    9159             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9160             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9161             :  *             if tmp == NULL:
    9162             :  */
    9163           0 :   __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
    9164           0 :   if (__pyx_t_2) {
    9165             : 
    9166             :     /* "View.MemoryView":463
    9167             :  * 
    9168             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9169             :  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
    9170             :  *             if tmp == NULL:
    9171             :  *                 raise MemoryError
    9172             :  */
    9173           0 :     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
    9174             : 
    9175             :     /* "View.MemoryView":464
    9176             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9177             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9178             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    9179             :  *                 raise MemoryError
    9180             :  *             item = tmp
    9181             :  */
    9182           0 :     __pyx_t_2 = (__pyx_v_tmp == NULL);
    9183           0 :     if (unlikely(__pyx_t_2)) {
    9184             : 
    9185             :       /* "View.MemoryView":465
    9186             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9187             :  *             if tmp == NULL:
    9188             :  *                 raise MemoryError             # <<<<<<<<<<<<<<
    9189             :  *             item = tmp
    9190             :  *         else:
    9191             :  */
    9192           0 :       PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)
    9193             : 
    9194             :       /* "View.MemoryView":464
    9195             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9196             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9197             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    9198             :  *                 raise MemoryError
    9199             :  *             item = tmp
    9200             :  */
    9201             :     }
    9202             : 
    9203             :     /* "View.MemoryView":466
    9204             :  *             if tmp == NULL:
    9205             :  *                 raise MemoryError
    9206             :  *             item = tmp             # <<<<<<<<<<<<<<
    9207             :  *         else:
    9208             :  *             item = <void *> array
    9209             :  */
    9210           0 :     __pyx_v_item = __pyx_v_tmp;
    9211             : 
    9212             :     /* "View.MemoryView":462
    9213             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9214             :  * 
    9215             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9216             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9217             :  *             if tmp == NULL:
    9218             :  */
    9219           0 :     goto __pyx_L3;
    9220             :   }
    9221             : 
    9222             :   /* "View.MemoryView":468
    9223             :  *             item = tmp
    9224             :  *         else:
    9225             :  *             item = <void *> array             # <<<<<<<<<<<<<<
    9226             :  * 
    9227             :  *         try:
    9228             :  */
    9229             :   /*else*/ {
    9230             :     __pyx_v_item = ((void *)__pyx_v_array);
    9231             :   }
    9232           0 :   __pyx_L3:;
    9233             : 
    9234             :   /* "View.MemoryView":470
    9235             :  *             item = <void *> array
    9236             :  * 
    9237             :  *         try:             # <<<<<<<<<<<<<<
    9238             :  *             if self.dtype_is_object:
    9239             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9240             :  */
    9241             :   /*try:*/ {
    9242             : 
    9243             :     /* "View.MemoryView":471
    9244             :  * 
    9245             :  *         try:
    9246             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9247             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9248             :  *             else:
    9249             :  */
    9250           0 :     if (__pyx_v_self->dtype_is_object) {
    9251             : 
    9252             :       /* "View.MemoryView":472
    9253             :  *         try:
    9254             :  *             if self.dtype_is_object:
    9255             :  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
    9256             :  *             else:
    9257             :  *                 self.assign_item_from_object(<char *> item, value)
    9258             :  */
    9259           0 :       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
    9260             : 
    9261             :       /* "View.MemoryView":471
    9262             :  * 
    9263             :  *         try:
    9264             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9265             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9266             :  *             else:
    9267             :  */
    9268           0 :       goto __pyx_L8;
    9269             :     }
    9270             : 
    9271             :     /* "View.MemoryView":474
    9272             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9273             :  *             else:
    9274             :  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
    9275             :  * 
    9276             :  * 
    9277             :  */
    9278             :     /*else*/ {
    9279           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
    9280           0 :       __Pyx_GOTREF(__pyx_t_3);
    9281           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9282             :     }
    9283           0 :     __pyx_L8:;
    9284             : 
    9285             :     /* "View.MemoryView":478
    9286             :  * 
    9287             :  * 
    9288             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9289             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9290             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9291             :  */
    9292           0 :     __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    9293           0 :     if (__pyx_t_2) {
    9294             : 
    9295             :       /* "View.MemoryView":479
    9296             :  * 
    9297             :  *             if self.view.suboffsets != NULL:
    9298             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
    9299             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9300             :  *                                 item, self.dtype_is_object)
    9301             :  */
    9302           0 :       __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)
    9303             : 
    9304             :       /* "View.MemoryView":478
    9305             :  * 
    9306             :  * 
    9307             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9308             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9309             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9310             :  */
    9311             :     }
    9312             : 
    9313             :     /* "View.MemoryView":480
    9314             :  *             if self.view.suboffsets != NULL:
    9315             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9316             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
    9317             :  *                                 item, self.dtype_is_object)
    9318             :  *         finally:
    9319             :  */
    9320           0 :     __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
    9321             :   }
    9322             : 
    9323             :   /* "View.MemoryView":483
    9324             :  *                                 item, self.dtype_is_object)
    9325             :  *         finally:
    9326             :  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
    9327             :  * 
    9328             :  *     cdef setitem_indexed(self, index, value):
    9329             :  */
    9330             :   /*finally:*/ {
    9331             :     /*normal exit:*/{
    9332           0 :       PyMem_Free(__pyx_v_tmp);
    9333           0 :       goto __pyx_L7;
    9334             :     }
    9335           0 :     __pyx_L6_error:;
    9336             :     /*exception exit:*/{
    9337           0 :       __Pyx_PyThreadState_declare
    9338           0 :       __Pyx_PyThreadState_assign
    9339           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9340           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    9341           0 :       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    9342           0 :       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    9343           0 :       __Pyx_XGOTREF(__pyx_t_7);
    9344           0 :       __Pyx_XGOTREF(__pyx_t_8);
    9345           0 :       __Pyx_XGOTREF(__pyx_t_9);
    9346           0 :       __Pyx_XGOTREF(__pyx_t_10);
    9347           0 :       __Pyx_XGOTREF(__pyx_t_11);
    9348           0 :       __Pyx_XGOTREF(__pyx_t_12);
    9349           0 :       __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
    9350             :       {
    9351           0 :         PyMem_Free(__pyx_v_tmp);
    9352             :       }
    9353           0 :       if (PY_MAJOR_VERSION >= 3) {
    9354           0 :         __Pyx_XGIVEREF(__pyx_t_10);
    9355           0 :         __Pyx_XGIVEREF(__pyx_t_11);
    9356           0 :         __Pyx_XGIVEREF(__pyx_t_12);
    9357           0 :         __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    9358             :       }
    9359           0 :       __Pyx_XGIVEREF(__pyx_t_7);
    9360           0 :       __Pyx_XGIVEREF(__pyx_t_8);
    9361           0 :       __Pyx_XGIVEREF(__pyx_t_9);
    9362           0 :       __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    9363           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9364           0 :       __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
    9365           0 :       goto __pyx_L1_error;
    9366             :     }
    9367           0 :     __pyx_L7:;
    9368             :   }
    9369             : 
    9370             :   /* "View.MemoryView":453
    9371             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9372             :  * 
    9373             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9374             :  *         cdef int array[128]
    9375             :  *         cdef void *tmp = NULL
    9376             :  */
    9377             : 
    9378             :   /* function exit code */
    9379           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9380           0 :   goto __pyx_L0;
    9381           0 :   __pyx_L1_error:;
    9382           0 :   __Pyx_XDECREF(__pyx_t_3);
    9383           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9384           0 :   __pyx_r = 0;
    9385           0 :   __pyx_L0:;
    9386           0 :   __Pyx_XGIVEREF(__pyx_r);
    9387           0 :   __Pyx_RefNannyFinishContext();
    9388           0 :   return __pyx_r;
    9389             : }
    9390             : 
    9391             : /* "View.MemoryView":485
    9392             :  *             PyMem_Free(tmp)
    9393             :  * 
    9394             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9395             :  *         cdef char *itemp = self.get_item_pointer(index)
    9396             :  *         self.assign_item_from_object(itemp, value)
    9397             :  */
    9398             : 
    9399           0 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    9400           0 :   char *__pyx_v_itemp;
    9401           0 :   PyObject *__pyx_r = NULL;
    9402             :   __Pyx_RefNannyDeclarations
    9403           0 :   char *__pyx_t_1;
    9404           0 :   PyObject *__pyx_t_2 = NULL;
    9405           0 :   int __pyx_lineno = 0;
    9406           0 :   const char *__pyx_filename = NULL;
    9407           0 :   int __pyx_clineno = 0;
    9408           0 :   __Pyx_RefNannySetupContext("setitem_indexed", 1);
    9409             : 
    9410             :   /* "View.MemoryView":486
    9411             :  * 
    9412             :  *     cdef setitem_indexed(self, index, value):
    9413             :  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
    9414             :  *         self.assign_item_from_object(itemp, value)
    9415             :  * 
    9416             :  */
    9417           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
    9418           0 :   __pyx_v_itemp = __pyx_t_1;
    9419             : 
    9420             :   /* "View.MemoryView":487
    9421             :  *     cdef setitem_indexed(self, index, value):
    9422             :  *         cdef char *itemp = self.get_item_pointer(index)
    9423             :  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
    9424             :  * 
    9425             :  *     cdef convert_item_to_object(self, char *itemp):
    9426             :  */
    9427           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
    9428           0 :   __Pyx_GOTREF(__pyx_t_2);
    9429           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9430             : 
    9431             :   /* "View.MemoryView":485
    9432             :  *             PyMem_Free(tmp)
    9433             :  * 
    9434             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9435             :  *         cdef char *itemp = self.get_item_pointer(index)
    9436             :  *         self.assign_item_from_object(itemp, value)
    9437             :  */
    9438             : 
    9439             :   /* function exit code */
    9440           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9441           0 :   goto __pyx_L0;
    9442           0 :   __pyx_L1_error:;
    9443           0 :   __Pyx_XDECREF(__pyx_t_2);
    9444           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9445           0 :   __pyx_r = 0;
    9446           0 :   __pyx_L0:;
    9447           0 :   __Pyx_XGIVEREF(__pyx_r);
    9448           0 :   __Pyx_RefNannyFinishContext();
    9449           0 :   return __pyx_r;
    9450             : }
    9451             : 
    9452             : /* "View.MemoryView":489
    9453             :  *         self.assign_item_from_object(itemp, value)
    9454             :  * 
    9455             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9456             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9457             :  *         know how to convert the type"""
    9458             :  */
    9459             : 
    9460           0 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
    9461           0 :   PyObject *__pyx_v_struct = NULL;
    9462           0 :   PyObject *__pyx_v_bytesitem = 0;
    9463           0 :   PyObject *__pyx_v_result = NULL;
    9464           0 :   PyObject *__pyx_r = NULL;
    9465             :   __Pyx_RefNannyDeclarations
    9466           0 :   PyObject *__pyx_t_1 = NULL;
    9467           0 :   PyObject *__pyx_t_2 = NULL;
    9468           0 :   PyObject *__pyx_t_3 = NULL;
    9469           0 :   PyObject *__pyx_t_4 = NULL;
    9470           0 :   PyObject *__pyx_t_5 = NULL;
    9471           0 :   PyObject *__pyx_t_6 = NULL;
    9472           0 :   PyObject *__pyx_t_7 = NULL;
    9473           0 :   unsigned int __pyx_t_8;
    9474           0 :   Py_ssize_t __pyx_t_9;
    9475           0 :   int __pyx_t_10;
    9476           0 :   int __pyx_t_11;
    9477           0 :   int __pyx_lineno = 0;
    9478           0 :   const char *__pyx_filename = NULL;
    9479           0 :   int __pyx_clineno = 0;
    9480           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
    9481             : 
    9482             :   /* "View.MemoryView":492
    9483             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9484             :  *         know how to convert the type"""
    9485             :  *         import struct             # <<<<<<<<<<<<<<
    9486             :  *         cdef bytes bytesitem
    9487             :  * 
    9488             :  */
    9489           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
    9490           0 :   __Pyx_GOTREF(__pyx_t_1);
    9491           0 :   __pyx_v_struct = __pyx_t_1;
    9492           0 :   __pyx_t_1 = 0;
    9493             : 
    9494             :   /* "View.MemoryView":495
    9495             :  *         cdef bytes bytesitem
    9496             :  * 
    9497             :  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
    9498             :  *         try:
    9499             :  *             result = struct.unpack(self.view.format, bytesitem)
    9500             :  */
    9501           0 :   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
    9502           0 :   __Pyx_GOTREF(__pyx_t_1);
    9503           0 :   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
    9504           0 :   __pyx_t_1 = 0;
    9505             : 
    9506             :   /* "View.MemoryView":496
    9507             :  * 
    9508             :  *         bytesitem = itemp[:self.view.itemsize]
    9509             :  *         try:             # <<<<<<<<<<<<<<
    9510             :  *             result = struct.unpack(self.view.format, bytesitem)
    9511             :  *         except struct.error:
    9512             :  */
    9513             :   {
    9514           0 :     __Pyx_PyThreadState_declare
    9515           0 :     __Pyx_PyThreadState_assign
    9516           0 :     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    9517           0 :     __Pyx_XGOTREF(__pyx_t_2);
    9518           0 :     __Pyx_XGOTREF(__pyx_t_3);
    9519           0 :     __Pyx_XGOTREF(__pyx_t_4);
    9520             :     /*try:*/ {
    9521             : 
    9522             :       /* "View.MemoryView":497
    9523             :  *         bytesitem = itemp[:self.view.itemsize]
    9524             :  *         try:
    9525             :  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
    9526             :  *         except struct.error:
    9527             :  *             raise ValueError, "Unable to convert item to object"
    9528             :  */
    9529           0 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
    9530           0 :       __Pyx_GOTREF(__pyx_t_5);
    9531           0 :       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
    9532           0 :       __Pyx_GOTREF(__pyx_t_6);
    9533           0 :       __pyx_t_7 = NULL;
    9534           0 :       __pyx_t_8 = 0;
    9535             :       #if CYTHON_UNPACK_METHODS
    9536           0 :       if (likely(PyMethod_Check(__pyx_t_5))) {
    9537           0 :         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    9538           0 :         if (likely(__pyx_t_7)) {
    9539           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9540           0 :           __Pyx_INCREF(__pyx_t_7);
    9541           0 :           __Pyx_INCREF(function);
    9542           0 :           __Pyx_DECREF_SET(__pyx_t_5, function);
    9543             :           __pyx_t_8 = 1;
    9544             :         }
    9545             :       }
    9546             :       #endif
    9547             :       {
    9548           0 :         PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
    9549           0 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
    9550           0 :         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9551           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    9552           0 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
    9553           0 :         __Pyx_GOTREF(__pyx_t_1);
    9554           0 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9555             :       }
    9556           0 :       __pyx_v_result = __pyx_t_1;
    9557           0 :       __pyx_t_1 = 0;
    9558             : 
    9559             :       /* "View.MemoryView":496
    9560             :  * 
    9561             :  *         bytesitem = itemp[:self.view.itemsize]
    9562             :  *         try:             # <<<<<<<<<<<<<<
    9563             :  *             result = struct.unpack(self.view.format, bytesitem)
    9564             :  *         except struct.error:
    9565             :  */
    9566             :     }
    9567             : 
    9568             :     /* "View.MemoryView":501
    9569             :  *             raise ValueError, "Unable to convert item to object"
    9570             :  *         else:
    9571             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9572             :  *                 return result[0]
    9573             :  *             return result
    9574             :  */
    9575             :     /*else:*/ {
    9576           0 :       __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
    9577           0 :       __pyx_t_10 = (__pyx_t_9 == 1);
    9578           0 :       if (__pyx_t_10) {
    9579             : 
    9580             :         /* "View.MemoryView":502
    9581             :  *         else:
    9582             :  *             if len(self.view.format) == 1:
    9583             :  *                 return result[0]             # <<<<<<<<<<<<<<
    9584             :  *             return result
    9585             :  * 
    9586             :  */
    9587           0 :         __Pyx_XDECREF(__pyx_r);
    9588           0 :         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
    9589           0 :         __Pyx_GOTREF(__pyx_t_1);
    9590           0 :         __pyx_r = __pyx_t_1;
    9591           0 :         __pyx_t_1 = 0;
    9592           0 :         goto __pyx_L6_except_return;
    9593             : 
    9594             :         /* "View.MemoryView":501
    9595             :  *             raise ValueError, "Unable to convert item to object"
    9596             :  *         else:
    9597             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9598             :  *                 return result[0]
    9599             :  *             return result
    9600             :  */
    9601             :       }
    9602             : 
    9603             :       /* "View.MemoryView":503
    9604             :  *             if len(self.view.format) == 1:
    9605             :  *                 return result[0]
    9606             :  *             return result             # <<<<<<<<<<<<<<
    9607             :  * 
    9608             :  *     cdef assign_item_from_object(self, char *itemp, object value):
    9609             :  */
    9610           0 :       __Pyx_XDECREF(__pyx_r);
    9611           0 :       __Pyx_INCREF(__pyx_v_result);
    9612           0 :       __pyx_r = __pyx_v_result;
    9613           0 :       goto __pyx_L6_except_return;
    9614             :     }
    9615           0 :     __pyx_L3_error:;
    9616           0 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    9617           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    9618           0 :     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    9619           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9620             : 
    9621             :     /* "View.MemoryView":498
    9622             :  *         try:
    9623             :  *             result = struct.unpack(self.view.format, bytesitem)
    9624             :  *         except struct.error:             # <<<<<<<<<<<<<<
    9625             :  *             raise ValueError, "Unable to convert item to object"
    9626             :  *         else:
    9627             :  */
    9628           0 :     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
    9629           0 :     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9630           0 :     __Pyx_GOTREF(__pyx_t_7);
    9631           0 :     __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
    9632           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    9633           0 :     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
    9634           0 :     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    9635           0 :     if (__pyx_t_11) {
    9636           0 :       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9637           0 :       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9638           0 :       __Pyx_XGOTREF(__pyx_t_6);
    9639           0 :       __Pyx_XGOTREF(__pyx_t_5);
    9640           0 :       __Pyx_XGOTREF(__pyx_t_1);
    9641             : 
    9642             :       /* "View.MemoryView":499
    9643             :  *             result = struct.unpack(self.view.format, bytesitem)
    9644             :  *         except struct.error:
    9645             :  *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
    9646             :  *         else:
    9647             :  *             if len(self.view.format) == 1:
    9648             :  */
    9649           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
    9650           0 :       __PYX_ERR(1, 499, __pyx_L5_except_error)
    9651             :     }
    9652           0 :     goto __pyx_L5_except_error;
    9653             : 
    9654             :     /* "View.MemoryView":496
    9655             :  * 
    9656             :  *         bytesitem = itemp[:self.view.itemsize]
    9657             :  *         try:             # <<<<<<<<<<<<<<
    9658             :  *             result = struct.unpack(self.view.format, bytesitem)
    9659             :  *         except struct.error:
    9660             :  */
    9661           0 :     __pyx_L5_except_error:;
    9662           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9663           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9664           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9665           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9666           0 :     goto __pyx_L1_error;
    9667           0 :     __pyx_L6_except_return:;
    9668           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9669           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9670           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9671           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9672           0 :     goto __pyx_L0;
    9673             :   }
    9674             : 
    9675             :   /* "View.MemoryView":489
    9676             :  *         self.assign_item_from_object(itemp, value)
    9677             :  * 
    9678             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9679             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9680             :  *         know how to convert the type"""
    9681             :  */
    9682             : 
    9683             :   /* function exit code */
    9684           0 :   __pyx_L1_error:;
    9685           0 :   __Pyx_XDECREF(__pyx_t_1);
    9686           0 :   __Pyx_XDECREF(__pyx_t_5);
    9687           0 :   __Pyx_XDECREF(__pyx_t_6);
    9688           0 :   __Pyx_XDECREF(__pyx_t_7);
    9689           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9690           0 :   __pyx_r = 0;
    9691           0 :   __pyx_L0:;
    9692           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9693           0 :   __Pyx_XDECREF(__pyx_v_bytesitem);
    9694           0 :   __Pyx_XDECREF(__pyx_v_result);
    9695           0 :   __Pyx_XGIVEREF(__pyx_r);
    9696           0 :   __Pyx_RefNannyFinishContext();
    9697           0 :   return __pyx_r;
    9698             : }
    9699             : 
    9700             : /* "View.MemoryView":505
    9701             :  *             return result
    9702             :  * 
    9703             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9704             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9705             :  *         know how to convert the type"""
    9706             :  */
    9707             : 
    9708           0 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
    9709           0 :   PyObject *__pyx_v_struct = NULL;
    9710           0 :   char __pyx_v_c;
    9711           0 :   PyObject *__pyx_v_bytesvalue = 0;
    9712           0 :   Py_ssize_t __pyx_v_i;
    9713           0 :   PyObject *__pyx_r = NULL;
    9714             :   __Pyx_RefNannyDeclarations
    9715           0 :   PyObject *__pyx_t_1 = NULL;
    9716           0 :   int __pyx_t_2;
    9717           0 :   PyObject *__pyx_t_3 = NULL;
    9718           0 :   PyObject *__pyx_t_4 = NULL;
    9719           0 :   PyObject *__pyx_t_5 = NULL;
    9720           0 :   unsigned int __pyx_t_6;
    9721           0 :   Py_ssize_t __pyx_t_7;
    9722           0 :   PyObject *__pyx_t_8 = NULL;
    9723           0 :   char *__pyx_t_9;
    9724           0 :   char *__pyx_t_10;
    9725           0 :   char *__pyx_t_11;
    9726           0 :   char *__pyx_t_12;
    9727           0 :   int __pyx_lineno = 0;
    9728           0 :   const char *__pyx_filename = NULL;
    9729           0 :   int __pyx_clineno = 0;
    9730           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
    9731             : 
    9732             :   /* "View.MemoryView":508
    9733             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9734             :  *         know how to convert the type"""
    9735             :  *         import struct             # <<<<<<<<<<<<<<
    9736             :  *         cdef char c
    9737             :  *         cdef bytes bytesvalue
    9738             :  */
    9739           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
    9740           0 :   __Pyx_GOTREF(__pyx_t_1);
    9741           0 :   __pyx_v_struct = __pyx_t_1;
    9742           0 :   __pyx_t_1 = 0;
    9743             : 
    9744             :   /* "View.MemoryView":513
    9745             :  *         cdef Py_ssize_t i
    9746             :  * 
    9747             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9748             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9749             :  *         else:
    9750             :  */
    9751           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
    9752           0 :   if (__pyx_t_2) {
    9753             : 
    9754             :     /* "View.MemoryView":514
    9755             :  * 
    9756             :  *         if isinstance(value, tuple):
    9757             :  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
    9758             :  *         else:
    9759             :  *             bytesvalue = struct.pack(self.view.format, value)
    9760             :  */
    9761           0 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
    9762           0 :     __Pyx_GOTREF(__pyx_t_1);
    9763           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9764           0 :     __Pyx_GOTREF(__pyx_t_3);
    9765           0 :     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
    9766           0 :     __Pyx_GOTREF(__pyx_t_4);
    9767           0 :     __Pyx_GIVEREF(__pyx_t_3);
    9768           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
    9769           0 :     __pyx_t_3 = 0;
    9770           0 :     __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9771           0 :     __Pyx_GOTREF(__pyx_t_3);
    9772           0 :     __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
    9773           0 :     __Pyx_GOTREF(__pyx_t_5);
    9774           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    9775           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9776           0 :     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9777           0 :     __Pyx_GOTREF(__pyx_t_3);
    9778           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9779           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9780           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
    9781           0 :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9782           0 :     __pyx_t_3 = 0;
    9783             : 
    9784             :     /* "View.MemoryView":513
    9785             :  *         cdef Py_ssize_t i
    9786             :  * 
    9787             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9788             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9789             :  *         else:
    9790             :  */
    9791           0 :     goto __pyx_L3;
    9792             :   }
    9793             : 
    9794             :   /* "View.MemoryView":516
    9795             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9796             :  *         else:
    9797             :  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
    9798             :  * 
    9799             :  *         for i, c in enumerate(bytesvalue):
    9800             :  */
    9801             :   /*else*/ {
    9802           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
    9803           0 :     __Pyx_GOTREF(__pyx_t_5);
    9804           0 :     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
    9805           0 :     __Pyx_GOTREF(__pyx_t_1);
    9806           0 :     __pyx_t_4 = NULL;
    9807           0 :     __pyx_t_6 = 0;
    9808             :     #if CYTHON_UNPACK_METHODS
    9809           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    9810           0 :       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    9811           0 :       if (likely(__pyx_t_4)) {
    9812           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9813           0 :         __Pyx_INCREF(__pyx_t_4);
    9814           0 :         __Pyx_INCREF(function);
    9815           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    9816             :         __pyx_t_6 = 1;
    9817             :       }
    9818             :     }
    9819             :     #endif
    9820             :     {
    9821           0 :       PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
    9822           0 :       __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    9823           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    9824           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9825           0 :       if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
    9826           0 :       __Pyx_GOTREF(__pyx_t_3);
    9827           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9828             :     }
    9829           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
    9830             :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9831             :     __pyx_t_3 = 0;
    9832             :   }
    9833           0 :   __pyx_L3:;
    9834             : 
    9835             :   /* "View.MemoryView":518
    9836             :  *             bytesvalue = struct.pack(self.view.format, value)
    9837             :  * 
    9838             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9839             :  *             itemp[i] = c
    9840             :  * 
    9841             :  */
    9842           0 :   __pyx_t_7 = 0;
    9843           0 :   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    9844           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    9845           0 :     __PYX_ERR(1, 518, __pyx_L1_error)
    9846             :   }
    9847           0 :   __Pyx_INCREF(__pyx_v_bytesvalue);
    9848           0 :   __pyx_t_8 = __pyx_v_bytesvalue;
    9849           0 :   __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
    9850           0 :   __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
    9851           0 :   for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
    9852           0 :     __pyx_t_9 = __pyx_t_12;
    9853           0 :     __pyx_v_c = (__pyx_t_9[0]);
    9854             : 
    9855             :     /* "View.MemoryView":519
    9856             :  * 
    9857             :  *         for i, c in enumerate(bytesvalue):
    9858             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9859             :  * 
    9860             :  *     @cname('getbuffer')
    9861             :  */
    9862           0 :     __pyx_v_i = __pyx_t_7;
    9863             : 
    9864             :     /* "View.MemoryView":518
    9865             :  *             bytesvalue = struct.pack(self.view.format, value)
    9866             :  * 
    9867             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9868             :  *             itemp[i] = c
    9869             :  * 
    9870             :  */
    9871           0 :     __pyx_t_7 = (__pyx_t_7 + 1);
    9872             : 
    9873             :     /* "View.MemoryView":519
    9874             :  * 
    9875             :  *         for i, c in enumerate(bytesvalue):
    9876             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9877             :  * 
    9878             :  *     @cname('getbuffer')
    9879             :  */
    9880           0 :     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
    9881             :   }
    9882           0 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    9883             : 
    9884             :   /* "View.MemoryView":505
    9885             :  *             return result
    9886             :  * 
    9887             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9888             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9889             :  *         know how to convert the type"""
    9890             :  */
    9891             : 
    9892             :   /* function exit code */
    9893           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9894           0 :   goto __pyx_L0;
    9895           0 :   __pyx_L1_error:;
    9896           0 :   __Pyx_XDECREF(__pyx_t_1);
    9897           0 :   __Pyx_XDECREF(__pyx_t_3);
    9898           0 :   __Pyx_XDECREF(__pyx_t_4);
    9899           0 :   __Pyx_XDECREF(__pyx_t_5);
    9900           0 :   __Pyx_XDECREF(__pyx_t_8);
    9901           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9902           0 :   __pyx_r = 0;
    9903           0 :   __pyx_L0:;
    9904           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9905           0 :   __Pyx_XDECREF(__pyx_v_bytesvalue);
    9906           0 :   __Pyx_XGIVEREF(__pyx_r);
    9907           0 :   __Pyx_RefNannyFinishContext();
    9908           0 :   return __pyx_r;
    9909             : }
    9910             : 
    9911             : /* "View.MemoryView":521
    9912             :  *             itemp[i] = c
    9913             :  * 
    9914             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    9915             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9916             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9917             :  */
    9918             : 
    9919             : /* Python wrapper */
    9920             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    9921           0 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9922           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    9923           0 :   int __pyx_r;
    9924             :   __Pyx_RefNannyDeclarations
    9925           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    9926           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    9927           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    9928             : 
    9929             :   /* function exit code */
    9930           0 :   __Pyx_RefNannyFinishContext();
    9931           0 :   return __pyx_r;
    9932             : }
    9933             : 
    9934           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9935           0 :   int __pyx_r;
    9936             :   __Pyx_RefNannyDeclarations
    9937           0 :   int __pyx_t_1;
    9938           0 :   int __pyx_t_2;
    9939           0 :   Py_ssize_t *__pyx_t_3;
    9940           0 :   char *__pyx_t_4;
    9941           0 :   void *__pyx_t_5;
    9942           0 :   int __pyx_t_6;
    9943           0 :   Py_ssize_t __pyx_t_7;
    9944           0 :   int __pyx_lineno = 0;
    9945           0 :   const char *__pyx_filename = NULL;
    9946           0 :   int __pyx_clineno = 0;
    9947           0 :   if (unlikely(__pyx_v_info == NULL)) {
    9948           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    9949           0 :     return -1;
    9950             :   }
    9951           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    9952           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    9953           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    9954             : 
    9955             :   /* "View.MemoryView":523
    9956             :  *     @cname('getbuffer')
    9957             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9958             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9959             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9960             :  * 
    9961             :  */
    9962           0 :   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
    9963           0 :   if (__pyx_t_2) {
    9964           0 :   } else {
    9965           0 :     __pyx_t_1 = __pyx_t_2;
    9966           0 :     goto __pyx_L4_bool_binop_done;
    9967             :   }
    9968           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
    9969           0 :   __pyx_L4_bool_binop_done:;
    9970           0 :   if (unlikely(__pyx_t_1)) {
    9971             : 
    9972             :     /* "View.MemoryView":524
    9973             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9974             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9975             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
    9976             :  * 
    9977             :  *         if flags & PyBUF_ND:
    9978             :  */
    9979           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
    9980           0 :     __PYX_ERR(1, 524, __pyx_L1_error)
    9981             : 
    9982             :     /* "View.MemoryView":523
    9983             :  *     @cname('getbuffer')
    9984             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9985             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9986             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9987             :  * 
    9988             :  */
    9989             :   }
    9990             : 
    9991             :   /* "View.MemoryView":526
    9992             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9993             :  * 
    9994             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
    9995             :  *             info.shape = self.view.shape
    9996             :  *         else:
    9997             :  */
    9998           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    9999           0 :   if (__pyx_t_1) {
   10000             : 
   10001             :     /* "View.MemoryView":527
   10002             :  * 
   10003             :  *         if flags & PyBUF_ND:
   10004             :  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
   10005             :  *         else:
   10006             :  *             info.shape = NULL
   10007             :  */
   10008           0 :     __pyx_t_3 = __pyx_v_self->view.shape;
   10009           0 :     __pyx_v_info->shape = __pyx_t_3;
   10010             : 
   10011             :     /* "View.MemoryView":526
   10012             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
   10013             :  * 
   10014             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
   10015             :  *             info.shape = self.view.shape
   10016             :  *         else:
   10017             :  */
   10018           0 :     goto __pyx_L6;
   10019             :   }
   10020             : 
   10021             :   /* "View.MemoryView":529
   10022             :  *             info.shape = self.view.shape
   10023             :  *         else:
   10024             :  *             info.shape = NULL             # <<<<<<<<<<<<<<
   10025             :  * 
   10026             :  *         if flags & PyBUF_STRIDES:
   10027             :  */
   10028             :   /*else*/ {
   10029           0 :     __pyx_v_info->shape = NULL;
   10030             :   }
   10031           0 :   __pyx_L6:;
   10032             : 
   10033             :   /* "View.MemoryView":531
   10034             :  *             info.shape = NULL
   10035             :  * 
   10036             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
   10037             :  *             info.strides = self.view.strides
   10038             :  *         else:
   10039             :  */
   10040           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
   10041           0 :   if (__pyx_t_1) {
   10042             : 
   10043             :     /* "View.MemoryView":532
   10044             :  * 
   10045             :  *         if flags & PyBUF_STRIDES:
   10046             :  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
   10047             :  *         else:
   10048             :  *             info.strides = NULL
   10049             :  */
   10050           0 :     __pyx_t_3 = __pyx_v_self->view.strides;
   10051           0 :     __pyx_v_info->strides = __pyx_t_3;
   10052             : 
   10053             :     /* "View.MemoryView":531
   10054             :  *             info.shape = NULL
   10055             :  * 
   10056             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
   10057             :  *             info.strides = self.view.strides
   10058             :  *         else:
   10059             :  */
   10060           0 :     goto __pyx_L7;
   10061             :   }
   10062             : 
   10063             :   /* "View.MemoryView":534
   10064             :  *             info.strides = self.view.strides
   10065             :  *         else:
   10066             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
   10067             :  * 
   10068             :  *         if flags & PyBUF_INDIRECT:
   10069             :  */
   10070             :   /*else*/ {
   10071           0 :     __pyx_v_info->strides = NULL;
   10072             :   }
   10073           0 :   __pyx_L7:;
   10074             : 
   10075             :   /* "View.MemoryView":536
   10076             :  *             info.strides = NULL
   10077             :  * 
   10078             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
   10079             :  *             info.suboffsets = self.view.suboffsets
   10080             :  *         else:
   10081             :  */
   10082           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
   10083           0 :   if (__pyx_t_1) {
   10084             : 
   10085             :     /* "View.MemoryView":537
   10086             :  * 
   10087             :  *         if flags & PyBUF_INDIRECT:
   10088             :  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
   10089             :  *         else:
   10090             :  *             info.suboffsets = NULL
   10091             :  */
   10092           0 :     __pyx_t_3 = __pyx_v_self->view.suboffsets;
   10093           0 :     __pyx_v_info->suboffsets = __pyx_t_3;
   10094             : 
   10095             :     /* "View.MemoryView":536
   10096             :  *             info.strides = NULL
   10097             :  * 
   10098             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
   10099             :  *             info.suboffsets = self.view.suboffsets
   10100             :  *         else:
   10101             :  */
   10102           0 :     goto __pyx_L8;
   10103             :   }
   10104             : 
   10105             :   /* "View.MemoryView":539
   10106             :  *             info.suboffsets = self.view.suboffsets
   10107             :  *         else:
   10108             :  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
   10109             :  * 
   10110             :  *         if flags & PyBUF_FORMAT:
   10111             :  */
   10112             :   /*else*/ {
   10113           0 :     __pyx_v_info->suboffsets = NULL;
   10114             :   }
   10115           0 :   __pyx_L8:;
   10116             : 
   10117             :   /* "View.MemoryView":541
   10118             :  *             info.suboffsets = NULL
   10119             :  * 
   10120             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
   10121             :  *             info.format = self.view.format
   10122             :  *         else:
   10123             :  */
   10124           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
   10125           0 :   if (__pyx_t_1) {
   10126             : 
   10127             :     /* "View.MemoryView":542
   10128             :  * 
   10129             :  *         if flags & PyBUF_FORMAT:
   10130             :  *             info.format = self.view.format             # <<<<<<<<<<<<<<
   10131             :  *         else:
   10132             :  *             info.format = NULL
   10133             :  */
   10134           0 :     __pyx_t_4 = __pyx_v_self->view.format;
   10135           0 :     __pyx_v_info->format = __pyx_t_4;
   10136             : 
   10137             :     /* "View.MemoryView":541
   10138             :  *             info.suboffsets = NULL
   10139             :  * 
   10140             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
   10141             :  *             info.format = self.view.format
   10142             :  *         else:
   10143             :  */
   10144           0 :     goto __pyx_L9;
   10145             :   }
   10146             : 
   10147             :   /* "View.MemoryView":544
   10148             :  *             info.format = self.view.format
   10149             :  *         else:
   10150             :  *             info.format = NULL             # <<<<<<<<<<<<<<
   10151             :  * 
   10152             :  *         info.buf = self.view.buf
   10153             :  */
   10154             :   /*else*/ {
   10155           0 :     __pyx_v_info->format = NULL;
   10156             :   }
   10157           0 :   __pyx_L9:;
   10158             : 
   10159             :   /* "View.MemoryView":546
   10160             :  *             info.format = NULL
   10161             :  * 
   10162             :  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
   10163             :  *         info.ndim = self.view.ndim
   10164             :  *         info.itemsize = self.view.itemsize
   10165             :  */
   10166           0 :   __pyx_t_5 = __pyx_v_self->view.buf;
   10167           0 :   __pyx_v_info->buf = __pyx_t_5;
   10168             : 
   10169             :   /* "View.MemoryView":547
   10170             :  * 
   10171             :  *         info.buf = self.view.buf
   10172             :  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
   10173             :  *         info.itemsize = self.view.itemsize
   10174             :  *         info.len = self.view.len
   10175             :  */
   10176           0 :   __pyx_t_6 = __pyx_v_self->view.ndim;
   10177           0 :   __pyx_v_info->ndim = __pyx_t_6;
   10178             : 
   10179             :   /* "View.MemoryView":548
   10180             :  *         info.buf = self.view.buf
   10181             :  *         info.ndim = self.view.ndim
   10182             :  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
   10183             :  *         info.len = self.view.len
   10184             :  *         info.readonly = self.view.readonly
   10185             :  */
   10186           0 :   __pyx_t_7 = __pyx_v_self->view.itemsize;
   10187           0 :   __pyx_v_info->itemsize = __pyx_t_7;
   10188             : 
   10189             :   /* "View.MemoryView":549
   10190             :  *         info.ndim = self.view.ndim
   10191             :  *         info.itemsize = self.view.itemsize
   10192             :  *         info.len = self.view.len             # <<<<<<<<<<<<<<
   10193             :  *         info.readonly = self.view.readonly
   10194             :  *         info.obj = self
   10195             :  */
   10196           0 :   __pyx_t_7 = __pyx_v_self->view.len;
   10197           0 :   __pyx_v_info->len = __pyx_t_7;
   10198             : 
   10199             :   /* "View.MemoryView":550
   10200             :  *         info.itemsize = self.view.itemsize
   10201             :  *         info.len = self.view.len
   10202             :  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
   10203             :  *         info.obj = self
   10204             :  * 
   10205             :  */
   10206           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
   10207           0 :   __pyx_v_info->readonly = __pyx_t_1;
   10208             : 
   10209             :   /* "View.MemoryView":551
   10210             :  *         info.len = self.view.len
   10211             :  *         info.readonly = self.view.readonly
   10212             :  *         info.obj = self             # <<<<<<<<<<<<<<
   10213             :  * 
   10214             :  * 
   10215             :  */
   10216           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
   10217           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
   10218           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
   10219           0 :   __Pyx_DECREF(__pyx_v_info->obj);
   10220           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
   10221             : 
   10222             :   /* "View.MemoryView":521
   10223             :  *             itemp[i] = c
   10224             :  * 
   10225             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
   10226             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10227             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10228             :  */
   10229             : 
   10230             :   /* function exit code */
   10231           0 :   __pyx_r = 0;
   10232           0 :   goto __pyx_L0;
   10233           0 :   __pyx_L1_error:;
   10234           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10235           0 :   __pyx_r = -1;
   10236           0 :   if (__pyx_v_info->obj != NULL) {
   10237           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10238           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10239             :   }
   10240           0 :   goto __pyx_L2;
   10241           0 :   __pyx_L0:;
   10242           0 :   if (__pyx_v_info->obj == Py_None) {
   10243           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10244           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10245             :   }
   10246           0 :   __pyx_L2:;
   10247             :   __Pyx_RefNannyFinishContext();
   10248             :   return __pyx_r;
   10249             : }
   10250             : 
   10251             : /* "View.MemoryView":554
   10252             :  * 
   10253             :  * 
   10254             :  *     @property             # <<<<<<<<<<<<<<
   10255             :  *     def T(self):
   10256             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10257             :  */
   10258             : 
   10259             : /* Python wrapper */
   10260             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
   10261           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
   10262           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10263           0 :   PyObject *__pyx_r = 0;
   10264             :   __Pyx_RefNannyDeclarations
   10265           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10266           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10267           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10268             : 
   10269             :   /* function exit code */
   10270           0 :   __Pyx_RefNannyFinishContext();
   10271           0 :   return __pyx_r;
   10272             : }
   10273             : 
   10274           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10275           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   10276           0 :   PyObject *__pyx_r = NULL;
   10277             :   __Pyx_RefNannyDeclarations
   10278           0 :   PyObject *__pyx_t_1 = NULL;
   10279           0 :   int __pyx_t_2;
   10280           0 :   int __pyx_lineno = 0;
   10281           0 :   const char *__pyx_filename = NULL;
   10282           0 :   int __pyx_clineno = 0;
   10283           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10284             : 
   10285             :   /* "View.MemoryView":556
   10286             :  *     @property
   10287             :  *     def T(self):
   10288             :  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
   10289             :  *         transpose_memslice(&result.from_slice)
   10290             :  *         return result
   10291             :  */
   10292           0 :   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
   10293           0 :   __Pyx_GOTREF(__pyx_t_1);
   10294           0 :   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
   10295           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
   10296           0 :   __pyx_t_1 = 0;
   10297             : 
   10298             :   /* "View.MemoryView":557
   10299             :  *     def T(self):
   10300             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10301             :  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
   10302             :  *         return result
   10303             :  * 
   10304             :  */
   10305           0 :   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)
   10306             : 
   10307             :   /* "View.MemoryView":558
   10308             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10309             :  *         transpose_memslice(&result.from_slice)
   10310             :  *         return result             # <<<<<<<<<<<<<<
   10311             :  * 
   10312             :  *     @property
   10313             :  */
   10314           0 :   __Pyx_XDECREF(__pyx_r);
   10315           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   10316           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   10317           0 :   goto __pyx_L0;
   10318             : 
   10319             :   /* "View.MemoryView":554
   10320             :  * 
   10321             :  * 
   10322             :  *     @property             # <<<<<<<<<<<<<<
   10323             :  *     def T(self):
   10324             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10325             :  */
   10326             : 
   10327             :   /* function exit code */
   10328           0 :   __pyx_L1_error:;
   10329           0 :   __Pyx_XDECREF(__pyx_t_1);
   10330           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10331           0 :   __pyx_r = NULL;
   10332           0 :   __pyx_L0:;
   10333           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   10334           0 :   __Pyx_XGIVEREF(__pyx_r);
   10335           0 :   __Pyx_RefNannyFinishContext();
   10336           0 :   return __pyx_r;
   10337             : }
   10338             : 
   10339             : /* "View.MemoryView":560
   10340             :  *         return result
   10341             :  * 
   10342             :  *     @property             # <<<<<<<<<<<<<<
   10343             :  *     def base(self):
   10344             :  *         return self._get_base()
   10345             :  */
   10346             : 
   10347             : /* Python wrapper */
   10348             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
   10349           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
   10350           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10351           0 :   PyObject *__pyx_r = 0;
   10352             :   __Pyx_RefNannyDeclarations
   10353           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10354           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10355           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10356             : 
   10357             :   /* function exit code */
   10358           0 :   __Pyx_RefNannyFinishContext();
   10359           0 :   return __pyx_r;
   10360             : }
   10361             : 
   10362           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10363           0 :   PyObject *__pyx_r = NULL;
   10364             :   __Pyx_RefNannyDeclarations
   10365           0 :   PyObject *__pyx_t_1 = NULL;
   10366           0 :   int __pyx_lineno = 0;
   10367           0 :   const char *__pyx_filename = NULL;
   10368           0 :   int __pyx_clineno = 0;
   10369           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10370             : 
   10371             :   /* "View.MemoryView":562
   10372             :  *     @property
   10373             :  *     def base(self):
   10374             :  *         return self._get_base()             # <<<<<<<<<<<<<<
   10375             :  * 
   10376             :  *     cdef _get_base(self):
   10377             :  */
   10378           0 :   __Pyx_XDECREF(__pyx_r);
   10379           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
   10380           0 :   __Pyx_GOTREF(__pyx_t_1);
   10381           0 :   __pyx_r = __pyx_t_1;
   10382           0 :   __pyx_t_1 = 0;
   10383           0 :   goto __pyx_L0;
   10384             : 
   10385             :   /* "View.MemoryView":560
   10386             :  *         return result
   10387             :  * 
   10388             :  *     @property             # <<<<<<<<<<<<<<
   10389             :  *     def base(self):
   10390             :  *         return self._get_base()
   10391             :  */
   10392             : 
   10393             :   /* function exit code */
   10394           0 :   __pyx_L1_error:;
   10395           0 :   __Pyx_XDECREF(__pyx_t_1);
   10396           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10397           0 :   __pyx_r = NULL;
   10398           0 :   __pyx_L0:;
   10399           0 :   __Pyx_XGIVEREF(__pyx_r);
   10400           0 :   __Pyx_RefNannyFinishContext();
   10401           0 :   return __pyx_r;
   10402             : }
   10403             : 
   10404             : /* "View.MemoryView":564
   10405             :  *         return self._get_base()
   10406             :  * 
   10407             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10408             :  *         return self.obj
   10409             :  * 
   10410             :  */
   10411             : 
   10412           0 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
   10413           0 :   PyObject *__pyx_r = NULL;
   10414             :   __Pyx_RefNannyDeclarations
   10415           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   10416             : 
   10417             :   /* "View.MemoryView":565
   10418             :  * 
   10419             :  *     cdef _get_base(self):
   10420             :  *         return self.obj             # <<<<<<<<<<<<<<
   10421             :  * 
   10422             :  *     @property
   10423             :  */
   10424           0 :   __Pyx_XDECREF(__pyx_r);
   10425           0 :   __Pyx_INCREF(__pyx_v_self->obj);
   10426           0 :   __pyx_r = __pyx_v_self->obj;
   10427           0 :   goto __pyx_L0;
   10428             : 
   10429             :   /* "View.MemoryView":564
   10430             :  *         return self._get_base()
   10431             :  * 
   10432             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10433             :  *         return self.obj
   10434             :  * 
   10435             :  */
   10436             : 
   10437             :   /* function exit code */
   10438           0 :   __pyx_L0:;
   10439           0 :   __Pyx_XGIVEREF(__pyx_r);
   10440           0 :   __Pyx_RefNannyFinishContext();
   10441           0 :   return __pyx_r;
   10442             : }
   10443             : 
   10444             : /* "View.MemoryView":567
   10445             :  *         return self.obj
   10446             :  * 
   10447             :  *     @property             # <<<<<<<<<<<<<<
   10448             :  *     def shape(self):
   10449             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10450             :  */
   10451             : 
   10452             : /* Python wrapper */
   10453             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
   10454           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
   10455           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10456           0 :   PyObject *__pyx_r = 0;
   10457             :   __Pyx_RefNannyDeclarations
   10458           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10459           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10460           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10461             : 
   10462             :   /* function exit code */
   10463           0 :   __Pyx_RefNannyFinishContext();
   10464           0 :   return __pyx_r;
   10465             : }
   10466             : 
   10467           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10468           0 :   Py_ssize_t __pyx_7genexpr__pyx_v_length;
   10469           0 :   PyObject *__pyx_r = NULL;
   10470             :   __Pyx_RefNannyDeclarations
   10471           0 :   PyObject *__pyx_t_1 = NULL;
   10472           0 :   Py_ssize_t *__pyx_t_2;
   10473           0 :   Py_ssize_t *__pyx_t_3;
   10474           0 :   Py_ssize_t *__pyx_t_4;
   10475           0 :   PyObject *__pyx_t_5 = NULL;
   10476           0 :   int __pyx_lineno = 0;
   10477           0 :   const char *__pyx_filename = NULL;
   10478           0 :   int __pyx_clineno = 0;
   10479           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10480             : 
   10481             :   /* "View.MemoryView":569
   10482             :  *     @property
   10483             :  *     def shape(self):
   10484             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10485             :  * 
   10486             :  *     @property
   10487             :  */
   10488           0 :   __Pyx_XDECREF(__pyx_r);
   10489             :   { /* enter inner scope */
   10490           0 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
   10491           0 :     __Pyx_GOTREF(__pyx_t_1);
   10492           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10493           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10494           0 :       __pyx_t_2 = __pyx_t_4;
   10495           0 :       __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
   10496           0 :       __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10497           0 :       __Pyx_GOTREF(__pyx_t_5);
   10498           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
   10499           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10500             :     }
   10501             :   } /* exit inner scope */
   10502           0 :   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10503           0 :   __Pyx_GOTREF(__pyx_t_5);
   10504           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10505           0 :   __pyx_r = __pyx_t_5;
   10506           0 :   __pyx_t_5 = 0;
   10507           0 :   goto __pyx_L0;
   10508             : 
   10509             :   /* "View.MemoryView":567
   10510             :  *         return self.obj
   10511             :  * 
   10512             :  *     @property             # <<<<<<<<<<<<<<
   10513             :  *     def shape(self):
   10514             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10515             :  */
   10516             : 
   10517             :   /* function exit code */
   10518           0 :   __pyx_L1_error:;
   10519           0 :   __Pyx_XDECREF(__pyx_t_1);
   10520           0 :   __Pyx_XDECREF(__pyx_t_5);
   10521           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10522           0 :   __pyx_r = NULL;
   10523           0 :   __pyx_L0:;
   10524           0 :   __Pyx_XGIVEREF(__pyx_r);
   10525           0 :   __Pyx_RefNannyFinishContext();
   10526           0 :   return __pyx_r;
   10527             : }
   10528             : 
   10529             : /* "View.MemoryView":571
   10530             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10531             :  * 
   10532             :  *     @property             # <<<<<<<<<<<<<<
   10533             :  *     def strides(self):
   10534             :  *         if self.view.strides == NULL:
   10535             :  */
   10536             : 
   10537             : /* Python wrapper */
   10538             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
   10539           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
   10540           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10541           0 :   PyObject *__pyx_r = 0;
   10542             :   __Pyx_RefNannyDeclarations
   10543           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10544           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10545           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10546             : 
   10547             :   /* function exit code */
   10548           0 :   __Pyx_RefNannyFinishContext();
   10549           0 :   return __pyx_r;
   10550             : }
   10551             : 
   10552           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10553           0 :   Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
   10554           0 :   PyObject *__pyx_r = NULL;
   10555             :   __Pyx_RefNannyDeclarations
   10556           0 :   int __pyx_t_1;
   10557           0 :   PyObject *__pyx_t_2 = NULL;
   10558           0 :   Py_ssize_t *__pyx_t_3;
   10559           0 :   Py_ssize_t *__pyx_t_4;
   10560           0 :   Py_ssize_t *__pyx_t_5;
   10561           0 :   PyObject *__pyx_t_6 = NULL;
   10562           0 :   int __pyx_lineno = 0;
   10563           0 :   const char *__pyx_filename = NULL;
   10564           0 :   int __pyx_clineno = 0;
   10565           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10566             : 
   10567             :   /* "View.MemoryView":573
   10568             :  *     @property
   10569             :  *     def strides(self):
   10570             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10571             :  * 
   10572             :  *             raise ValueError, "Buffer view does not expose strides"
   10573             :  */
   10574           0 :   __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
   10575           0 :   if (unlikely(__pyx_t_1)) {
   10576             : 
   10577             :     /* "View.MemoryView":575
   10578             :  *         if self.view.strides == NULL:
   10579             :  * 
   10580             :  *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
   10581             :  * 
   10582             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10583             :  */
   10584           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
   10585           0 :     __PYX_ERR(1, 575, __pyx_L1_error)
   10586             : 
   10587             :     /* "View.MemoryView":573
   10588             :  *     @property
   10589             :  *     def strides(self):
   10590             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10591             :  * 
   10592             :  *             raise ValueError, "Buffer view does not expose strides"
   10593             :  */
   10594             :   }
   10595             : 
   10596             :   /* "View.MemoryView":577
   10597             :  *             raise ValueError, "Buffer view does not expose strides"
   10598             :  * 
   10599             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10600             :  * 
   10601             :  *     @property
   10602             :  */
   10603           0 :   __Pyx_XDECREF(__pyx_r);
   10604             :   { /* enter inner scope */
   10605           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
   10606           0 :     __Pyx_GOTREF(__pyx_t_2);
   10607           0 :     __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
   10608           0 :     for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10609           0 :       __pyx_t_3 = __pyx_t_5;
   10610           0 :       __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
   10611           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10612           0 :       __Pyx_GOTREF(__pyx_t_6);
   10613           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
   10614           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10615             :     }
   10616             :   } /* exit inner scope */
   10617           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10618           0 :   __Pyx_GOTREF(__pyx_t_6);
   10619           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10620           0 :   __pyx_r = __pyx_t_6;
   10621           0 :   __pyx_t_6 = 0;
   10622           0 :   goto __pyx_L0;
   10623             : 
   10624             :   /* "View.MemoryView":571
   10625             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10626             :  * 
   10627             :  *     @property             # <<<<<<<<<<<<<<
   10628             :  *     def strides(self):
   10629             :  *         if self.view.strides == NULL:
   10630             :  */
   10631             : 
   10632             :   /* function exit code */
   10633           0 :   __pyx_L1_error:;
   10634           0 :   __Pyx_XDECREF(__pyx_t_2);
   10635           0 :   __Pyx_XDECREF(__pyx_t_6);
   10636           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10637           0 :   __pyx_r = NULL;
   10638           0 :   __pyx_L0:;
   10639           0 :   __Pyx_XGIVEREF(__pyx_r);
   10640           0 :   __Pyx_RefNannyFinishContext();
   10641           0 :   return __pyx_r;
   10642             : }
   10643             : 
   10644             : /* "View.MemoryView":579
   10645             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10646             :  * 
   10647             :  *     @property             # <<<<<<<<<<<<<<
   10648             :  *     def suboffsets(self):
   10649             :  *         if self.view.suboffsets == NULL:
   10650             :  */
   10651             : 
   10652             : /* Python wrapper */
   10653             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
   10654           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
   10655           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10656           0 :   PyObject *__pyx_r = 0;
   10657             :   __Pyx_RefNannyDeclarations
   10658           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10659           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10660           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10661             : 
   10662             :   /* function exit code */
   10663           0 :   __Pyx_RefNannyFinishContext();
   10664           0 :   return __pyx_r;
   10665             : }
   10666             : 
   10667           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10668           0 :   Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
   10669           0 :   PyObject *__pyx_r = NULL;
   10670             :   __Pyx_RefNannyDeclarations
   10671           0 :   int __pyx_t_1;
   10672           0 :   PyObject *__pyx_t_2 = NULL;
   10673           0 :   Py_ssize_t *__pyx_t_3;
   10674           0 :   Py_ssize_t *__pyx_t_4;
   10675           0 :   Py_ssize_t *__pyx_t_5;
   10676           0 :   PyObject *__pyx_t_6 = NULL;
   10677           0 :   int __pyx_lineno = 0;
   10678           0 :   const char *__pyx_filename = NULL;
   10679           0 :   int __pyx_clineno = 0;
   10680           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10681             : 
   10682             :   /* "View.MemoryView":581
   10683             :  *     @property
   10684             :  *     def suboffsets(self):
   10685             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10686             :  *             return (-1,) * self.view.ndim
   10687             :  * 
   10688             :  */
   10689           0 :   __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
   10690           0 :   if (__pyx_t_1) {
   10691             : 
   10692             :     /* "View.MemoryView":582
   10693             :  *     def suboffsets(self):
   10694             :  *         if self.view.suboffsets == NULL:
   10695             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   10696             :  * 
   10697             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10698             :  */
   10699           0 :     __Pyx_XDECREF(__pyx_r);
   10700           0 :     __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
   10701           0 :     __Pyx_GOTREF(__pyx_t_2);
   10702           0 :     __pyx_r = __pyx_t_2;
   10703           0 :     __pyx_t_2 = 0;
   10704           0 :     goto __pyx_L0;
   10705             : 
   10706             :     /* "View.MemoryView":581
   10707             :  *     @property
   10708             :  *     def suboffsets(self):
   10709             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10710             :  *             return (-1,) * self.view.ndim
   10711             :  * 
   10712             :  */
   10713             :   }
   10714             : 
   10715             :   /* "View.MemoryView":584
   10716             :  *             return (-1,) * self.view.ndim
   10717             :  * 
   10718             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10719             :  * 
   10720             :  *     @property
   10721             :  */
   10722           0 :   __Pyx_XDECREF(__pyx_r);
   10723             :   { /* enter inner scope */
   10724           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
   10725           0 :     __Pyx_GOTREF(__pyx_t_2);
   10726           0 :     __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
   10727           0 :     for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10728           0 :       __pyx_t_3 = __pyx_t_5;
   10729           0 :       __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
   10730           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10731           0 :       __Pyx_GOTREF(__pyx_t_6);
   10732           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
   10733           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10734             :     }
   10735             :   } /* exit inner scope */
   10736           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10737           0 :   __Pyx_GOTREF(__pyx_t_6);
   10738           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10739           0 :   __pyx_r = __pyx_t_6;
   10740           0 :   __pyx_t_6 = 0;
   10741           0 :   goto __pyx_L0;
   10742             : 
   10743             :   /* "View.MemoryView":579
   10744             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10745             :  * 
   10746             :  *     @property             # <<<<<<<<<<<<<<
   10747             :  *     def suboffsets(self):
   10748             :  *         if self.view.suboffsets == NULL:
   10749             :  */
   10750             : 
   10751             :   /* function exit code */
   10752           0 :   __pyx_L1_error:;
   10753           0 :   __Pyx_XDECREF(__pyx_t_2);
   10754           0 :   __Pyx_XDECREF(__pyx_t_6);
   10755           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10756           0 :   __pyx_r = NULL;
   10757           0 :   __pyx_L0:;
   10758           0 :   __Pyx_XGIVEREF(__pyx_r);
   10759           0 :   __Pyx_RefNannyFinishContext();
   10760           0 :   return __pyx_r;
   10761             : }
   10762             : 
   10763             : /* "View.MemoryView":586
   10764             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10765             :  * 
   10766             :  *     @property             # <<<<<<<<<<<<<<
   10767             :  *     def ndim(self):
   10768             :  *         return self.view.ndim
   10769             :  */
   10770             : 
   10771             : /* Python wrapper */
   10772             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
   10773           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
   10774           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10775           0 :   PyObject *__pyx_r = 0;
   10776             :   __Pyx_RefNannyDeclarations
   10777           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10778           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10779           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10780             : 
   10781             :   /* function exit code */
   10782           0 :   __Pyx_RefNannyFinishContext();
   10783           0 :   return __pyx_r;
   10784             : }
   10785             : 
   10786           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10787           0 :   PyObject *__pyx_r = NULL;
   10788             :   __Pyx_RefNannyDeclarations
   10789           0 :   PyObject *__pyx_t_1 = NULL;
   10790           0 :   int __pyx_lineno = 0;
   10791           0 :   const char *__pyx_filename = NULL;
   10792           0 :   int __pyx_clineno = 0;
   10793           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10794             : 
   10795             :   /* "View.MemoryView":588
   10796             :  *     @property
   10797             :  *     def ndim(self):
   10798             :  *         return self.view.ndim             # <<<<<<<<<<<<<<
   10799             :  * 
   10800             :  *     @property
   10801             :  */
   10802           0 :   __Pyx_XDECREF(__pyx_r);
   10803           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
   10804           0 :   __Pyx_GOTREF(__pyx_t_1);
   10805           0 :   __pyx_r = __pyx_t_1;
   10806           0 :   __pyx_t_1 = 0;
   10807           0 :   goto __pyx_L0;
   10808             : 
   10809             :   /* "View.MemoryView":586
   10810             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10811             :  * 
   10812             :  *     @property             # <<<<<<<<<<<<<<
   10813             :  *     def ndim(self):
   10814             :  *         return self.view.ndim
   10815             :  */
   10816             : 
   10817             :   /* function exit code */
   10818           0 :   __pyx_L1_error:;
   10819           0 :   __Pyx_XDECREF(__pyx_t_1);
   10820           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10821           0 :   __pyx_r = NULL;
   10822           0 :   __pyx_L0:;
   10823           0 :   __Pyx_XGIVEREF(__pyx_r);
   10824           0 :   __Pyx_RefNannyFinishContext();
   10825           0 :   return __pyx_r;
   10826             : }
   10827             : 
   10828             : /* "View.MemoryView":590
   10829             :  *         return self.view.ndim
   10830             :  * 
   10831             :  *     @property             # <<<<<<<<<<<<<<
   10832             :  *     def itemsize(self):
   10833             :  *         return self.view.itemsize
   10834             :  */
   10835             : 
   10836             : /* Python wrapper */
   10837             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
   10838           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
   10839           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10840           0 :   PyObject *__pyx_r = 0;
   10841             :   __Pyx_RefNannyDeclarations
   10842           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10843           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10844           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10845             : 
   10846             :   /* function exit code */
   10847           0 :   __Pyx_RefNannyFinishContext();
   10848           0 :   return __pyx_r;
   10849             : }
   10850             : 
   10851           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10852           0 :   PyObject *__pyx_r = NULL;
   10853             :   __Pyx_RefNannyDeclarations
   10854           0 :   PyObject *__pyx_t_1 = NULL;
   10855           0 :   int __pyx_lineno = 0;
   10856           0 :   const char *__pyx_filename = NULL;
   10857           0 :   int __pyx_clineno = 0;
   10858           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10859             : 
   10860             :   /* "View.MemoryView":592
   10861             :  *     @property
   10862             :  *     def itemsize(self):
   10863             :  *         return self.view.itemsize             # <<<<<<<<<<<<<<
   10864             :  * 
   10865             :  *     @property
   10866             :  */
   10867           0 :   __Pyx_XDECREF(__pyx_r);
   10868           0 :   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
   10869           0 :   __Pyx_GOTREF(__pyx_t_1);
   10870           0 :   __pyx_r = __pyx_t_1;
   10871           0 :   __pyx_t_1 = 0;
   10872           0 :   goto __pyx_L0;
   10873             : 
   10874             :   /* "View.MemoryView":590
   10875             :  *         return self.view.ndim
   10876             :  * 
   10877             :  *     @property             # <<<<<<<<<<<<<<
   10878             :  *     def itemsize(self):
   10879             :  *         return self.view.itemsize
   10880             :  */
   10881             : 
   10882             :   /* function exit code */
   10883           0 :   __pyx_L1_error:;
   10884           0 :   __Pyx_XDECREF(__pyx_t_1);
   10885           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10886           0 :   __pyx_r = NULL;
   10887           0 :   __pyx_L0:;
   10888           0 :   __Pyx_XGIVEREF(__pyx_r);
   10889           0 :   __Pyx_RefNannyFinishContext();
   10890           0 :   return __pyx_r;
   10891             : }
   10892             : 
   10893             : /* "View.MemoryView":594
   10894             :  *         return self.view.itemsize
   10895             :  * 
   10896             :  *     @property             # <<<<<<<<<<<<<<
   10897             :  *     def nbytes(self):
   10898             :  *         return self.size * self.view.itemsize
   10899             :  */
   10900             : 
   10901             : /* Python wrapper */
   10902             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
   10903           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
   10904           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10905           0 :   PyObject *__pyx_r = 0;
   10906             :   __Pyx_RefNannyDeclarations
   10907           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10908           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10909           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10910             : 
   10911             :   /* function exit code */
   10912           0 :   __Pyx_RefNannyFinishContext();
   10913           0 :   return __pyx_r;
   10914             : }
   10915             : 
   10916           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10917           0 :   PyObject *__pyx_r = NULL;
   10918             :   __Pyx_RefNannyDeclarations
   10919           0 :   PyObject *__pyx_t_1 = NULL;
   10920           0 :   PyObject *__pyx_t_2 = NULL;
   10921           0 :   PyObject *__pyx_t_3 = NULL;
   10922           0 :   int __pyx_lineno = 0;
   10923           0 :   const char *__pyx_filename = NULL;
   10924           0 :   int __pyx_clineno = 0;
   10925           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10926             : 
   10927             :   /* "View.MemoryView":596
   10928             :  *     @property
   10929             :  *     def nbytes(self):
   10930             :  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
   10931             :  * 
   10932             :  *     @property
   10933             :  */
   10934           0 :   __Pyx_XDECREF(__pyx_r);
   10935           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
   10936           0 :   __Pyx_GOTREF(__pyx_t_1);
   10937           0 :   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
   10938           0 :   __Pyx_GOTREF(__pyx_t_2);
   10939           0 :   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
   10940           0 :   __Pyx_GOTREF(__pyx_t_3);
   10941           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10942           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10943           0 :   __pyx_r = __pyx_t_3;
   10944           0 :   __pyx_t_3 = 0;
   10945           0 :   goto __pyx_L0;
   10946             : 
   10947             :   /* "View.MemoryView":594
   10948             :  *         return self.view.itemsize
   10949             :  * 
   10950             :  *     @property             # <<<<<<<<<<<<<<
   10951             :  *     def nbytes(self):
   10952             :  *         return self.size * self.view.itemsize
   10953             :  */
   10954             : 
   10955             :   /* function exit code */
   10956           0 :   __pyx_L1_error:;
   10957           0 :   __Pyx_XDECREF(__pyx_t_1);
   10958           0 :   __Pyx_XDECREF(__pyx_t_2);
   10959           0 :   __Pyx_XDECREF(__pyx_t_3);
   10960           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10961           0 :   __pyx_r = NULL;
   10962           0 :   __pyx_L0:;
   10963           0 :   __Pyx_XGIVEREF(__pyx_r);
   10964           0 :   __Pyx_RefNannyFinishContext();
   10965           0 :   return __pyx_r;
   10966             : }
   10967             : 
   10968             : /* "View.MemoryView":598
   10969             :  *         return self.size * self.view.itemsize
   10970             :  * 
   10971             :  *     @property             # <<<<<<<<<<<<<<
   10972             :  *     def size(self):
   10973             :  *         if self._size is None:
   10974             :  */
   10975             : 
   10976             : /* Python wrapper */
   10977             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
   10978           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
   10979           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10980           0 :   PyObject *__pyx_r = 0;
   10981             :   __Pyx_RefNannyDeclarations
   10982           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10983           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10984           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10985             : 
   10986             :   /* function exit code */
   10987           0 :   __Pyx_RefNannyFinishContext();
   10988           0 :   return __pyx_r;
   10989             : }
   10990             : 
   10991           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10992           0 :   PyObject *__pyx_v_result = NULL;
   10993           0 :   PyObject *__pyx_v_length = NULL;
   10994           0 :   PyObject *__pyx_r = NULL;
   10995             :   __Pyx_RefNannyDeclarations
   10996           0 :   int __pyx_t_1;
   10997           0 :   Py_ssize_t *__pyx_t_2;
   10998           0 :   Py_ssize_t *__pyx_t_3;
   10999           0 :   Py_ssize_t *__pyx_t_4;
   11000           0 :   PyObject *__pyx_t_5 = NULL;
   11001           0 :   int __pyx_lineno = 0;
   11002           0 :   const char *__pyx_filename = NULL;
   11003           0 :   int __pyx_clineno = 0;
   11004           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11005             : 
   11006             :   /* "View.MemoryView":600
   11007             :  *     @property
   11008             :  *     def size(self):
   11009             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   11010             :  *             result = 1
   11011             :  * 
   11012             :  */
   11013           0 :   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
   11014           0 :   if (__pyx_t_1) {
   11015             : 
   11016             :     /* "View.MemoryView":601
   11017             :  *     def size(self):
   11018             :  *         if self._size is None:
   11019             :  *             result = 1             # <<<<<<<<<<<<<<
   11020             :  * 
   11021             :  *             for length in self.view.shape[:self.view.ndim]:
   11022             :  */
   11023           0 :     __Pyx_INCREF(__pyx_int_1);
   11024           0 :     __pyx_v_result = __pyx_int_1;
   11025             : 
   11026             :     /* "View.MemoryView":603
   11027             :  *             result = 1
   11028             :  * 
   11029             :  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
   11030             :  *                 result *= length
   11031             :  * 
   11032             :  */
   11033           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   11034           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   11035           0 :       __pyx_t_2 = __pyx_t_4;
   11036           0 :       __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
   11037           0 :       __Pyx_GOTREF(__pyx_t_5);
   11038           0 :       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
   11039           0 :       __pyx_t_5 = 0;
   11040             : 
   11041             :       /* "View.MemoryView":604
   11042             :  * 
   11043             :  *             for length in self.view.shape[:self.view.ndim]:
   11044             :  *                 result *= length             # <<<<<<<<<<<<<<
   11045             :  * 
   11046             :  *             self._size = result
   11047             :  */
   11048           0 :       __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
   11049           0 :       __Pyx_GOTREF(__pyx_t_5);
   11050           0 :       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
   11051           0 :       __pyx_t_5 = 0;
   11052             :     }
   11053             : 
   11054             :     /* "View.MemoryView":606
   11055             :  *                 result *= length
   11056             :  * 
   11057             :  *             self._size = result             # <<<<<<<<<<<<<<
   11058             :  * 
   11059             :  *         return self._size
   11060             :  */
   11061           0 :     __Pyx_INCREF(__pyx_v_result);
   11062           0 :     __Pyx_GIVEREF(__pyx_v_result);
   11063           0 :     __Pyx_GOTREF(__pyx_v_self->_size);
   11064           0 :     __Pyx_DECREF(__pyx_v_self->_size);
   11065           0 :     __pyx_v_self->_size = __pyx_v_result;
   11066             : 
   11067             :     /* "View.MemoryView":600
   11068             :  *     @property
   11069             :  *     def size(self):
   11070             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   11071             :  *             result = 1
   11072             :  * 
   11073             :  */
   11074             :   }
   11075             : 
   11076             :   /* "View.MemoryView":608
   11077             :  *             self._size = result
   11078             :  * 
   11079             :  *         return self._size             # <<<<<<<<<<<<<<
   11080             :  * 
   11081             :  *     def __len__(self):
   11082             :  */
   11083           0 :   __Pyx_XDECREF(__pyx_r);
   11084           0 :   __Pyx_INCREF(__pyx_v_self->_size);
   11085           0 :   __pyx_r = __pyx_v_self->_size;
   11086           0 :   goto __pyx_L0;
   11087             : 
   11088             :   /* "View.MemoryView":598
   11089             :  *         return self.size * self.view.itemsize
   11090             :  * 
   11091             :  *     @property             # <<<<<<<<<<<<<<
   11092             :  *     def size(self):
   11093             :  *         if self._size is None:
   11094             :  */
   11095             : 
   11096             :   /* function exit code */
   11097           0 :   __pyx_L1_error:;
   11098           0 :   __Pyx_XDECREF(__pyx_t_5);
   11099           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11100           0 :   __pyx_r = NULL;
   11101           0 :   __pyx_L0:;
   11102           0 :   __Pyx_XDECREF(__pyx_v_result);
   11103           0 :   __Pyx_XDECREF(__pyx_v_length);
   11104           0 :   __Pyx_XGIVEREF(__pyx_r);
   11105           0 :   __Pyx_RefNannyFinishContext();
   11106           0 :   return __pyx_r;
   11107             : }
   11108             : 
   11109             : /* "View.MemoryView":610
   11110             :  *         return self._size
   11111             :  * 
   11112             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   11113             :  *         if self.view.ndim >= 1:
   11114             :  *             return self.view.shape[0]
   11115             :  */
   11116             : 
   11117             : /* Python wrapper */
   11118             : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
   11119           0 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
   11120           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11121           0 :   Py_ssize_t __pyx_r;
   11122             :   __Pyx_RefNannyDeclarations
   11123           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   11124           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11125           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11126             : 
   11127             :   /* function exit code */
   11128           0 :   __Pyx_RefNannyFinishContext();
   11129           0 :   return __pyx_r;
   11130             : }
   11131             : 
   11132           0 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11133           0 :   Py_ssize_t __pyx_r;
   11134           0 :   int __pyx_t_1;
   11135             : 
   11136             :   /* "View.MemoryView":611
   11137             :  * 
   11138             :  *     def __len__(self):
   11139             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   11140             :  *             return self.view.shape[0]
   11141             :  * 
   11142             :  */
   11143           0 :   __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
   11144           0 :   if (__pyx_t_1) {
   11145             : 
   11146             :     /* "View.MemoryView":612
   11147             :  *     def __len__(self):
   11148             :  *         if self.view.ndim >= 1:
   11149             :  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
   11150             :  * 
   11151             :  *         return 0
   11152             :  */
   11153           0 :     __pyx_r = (__pyx_v_self->view.shape[0]);
   11154           0 :     goto __pyx_L0;
   11155             : 
   11156             :     /* "View.MemoryView":611
   11157             :  * 
   11158             :  *     def __len__(self):
   11159             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   11160             :  *             return self.view.shape[0]
   11161             :  * 
   11162             :  */
   11163             :   }
   11164             : 
   11165             :   /* "View.MemoryView":614
   11166             :  *             return self.view.shape[0]
   11167             :  * 
   11168             :  *         return 0             # <<<<<<<<<<<<<<
   11169             :  * 
   11170             :  *     def __repr__(self):
   11171             :  */
   11172           0 :   __pyx_r = 0;
   11173           0 :   goto __pyx_L0;
   11174             : 
   11175             :   /* "View.MemoryView":610
   11176             :  *         return self._size
   11177             :  * 
   11178             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   11179             :  *         if self.view.ndim >= 1:
   11180             :  *             return self.view.shape[0]
   11181             :  */
   11182             : 
   11183             :   /* function exit code */
   11184           0 :   __pyx_L0:;
   11185           0 :   return __pyx_r;
   11186             : }
   11187             : 
   11188             : /* "View.MemoryView":616
   11189             :  *         return 0
   11190             :  * 
   11191             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11192             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11193             :  *                                                id(self))
   11194             :  */
   11195             : 
   11196             : /* Python wrapper */
   11197             : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
   11198           0 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
   11199           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11200           0 :   PyObject *__pyx_r = 0;
   11201             :   __Pyx_RefNannyDeclarations
   11202           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
   11203           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11204           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11205             : 
   11206             :   /* function exit code */
   11207           0 :   __Pyx_RefNannyFinishContext();
   11208           0 :   return __pyx_r;
   11209             : }
   11210             : 
   11211           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11212           0 :   PyObject *__pyx_r = NULL;
   11213             :   __Pyx_RefNannyDeclarations
   11214           0 :   PyObject *__pyx_t_1 = NULL;
   11215           0 :   PyObject *__pyx_t_2 = NULL;
   11216           0 :   PyObject *__pyx_t_3 = NULL;
   11217           0 :   int __pyx_lineno = 0;
   11218           0 :   const char *__pyx_filename = NULL;
   11219           0 :   int __pyx_clineno = 0;
   11220           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
   11221             : 
   11222             :   /* "View.MemoryView":617
   11223             :  * 
   11224             :  *     def __repr__(self):
   11225             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11226             :  *                                                id(self))
   11227             :  * 
   11228             :  */
   11229           0 :   __Pyx_XDECREF(__pyx_r);
   11230           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11231           0 :   __Pyx_GOTREF(__pyx_t_1);
   11232           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11233           0 :   __Pyx_GOTREF(__pyx_t_2);
   11234           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11235           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11236           0 :   __Pyx_GOTREF(__pyx_t_1);
   11237           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11238             : 
   11239             :   /* "View.MemoryView":618
   11240             :  *     def __repr__(self):
   11241             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11242             :  *                                                id(self))             # <<<<<<<<<<<<<<
   11243             :  * 
   11244             :  *     def __str__(self):
   11245             :  */
   11246           0 :   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
   11247           0 :   __Pyx_GOTREF(__pyx_t_2);
   11248             : 
   11249             :   /* "View.MemoryView":617
   11250             :  * 
   11251             :  *     def __repr__(self):
   11252             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11253             :  *                                                id(self))
   11254             :  * 
   11255             :  */
   11256           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
   11257           0 :   __Pyx_GOTREF(__pyx_t_3);
   11258           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11259           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
   11260           0 :   __Pyx_GIVEREF(__pyx_t_2);
   11261           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
   11262           0 :   __pyx_t_1 = 0;
   11263           0 :   __pyx_t_2 = 0;
   11264           0 :   __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11265           0 :   __Pyx_GOTREF(__pyx_t_2);
   11266           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11267           0 :   __pyx_r = __pyx_t_2;
   11268           0 :   __pyx_t_2 = 0;
   11269           0 :   goto __pyx_L0;
   11270             : 
   11271             :   /* "View.MemoryView":616
   11272             :  *         return 0
   11273             :  * 
   11274             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11275             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11276             :  *                                                id(self))
   11277             :  */
   11278             : 
   11279             :   /* function exit code */
   11280           0 :   __pyx_L1_error:;
   11281           0 :   __Pyx_XDECREF(__pyx_t_1);
   11282           0 :   __Pyx_XDECREF(__pyx_t_2);
   11283           0 :   __Pyx_XDECREF(__pyx_t_3);
   11284           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11285           0 :   __pyx_r = NULL;
   11286           0 :   __pyx_L0:;
   11287           0 :   __Pyx_XGIVEREF(__pyx_r);
   11288           0 :   __Pyx_RefNannyFinishContext();
   11289           0 :   return __pyx_r;
   11290             : }
   11291             : 
   11292             : /* "View.MemoryView":620
   11293             :  *                                                id(self))
   11294             :  * 
   11295             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11296             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11297             :  * 
   11298             :  */
   11299             : 
   11300             : /* Python wrapper */
   11301             : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
   11302           0 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
   11303           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11304           0 :   PyObject *__pyx_r = 0;
   11305             :   __Pyx_RefNannyDeclarations
   11306           0 :   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   11307           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11308           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11309             : 
   11310             :   /* function exit code */
   11311           0 :   __Pyx_RefNannyFinishContext();
   11312           0 :   return __pyx_r;
   11313             : }
   11314             : 
   11315           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11316           0 :   PyObject *__pyx_r = NULL;
   11317             :   __Pyx_RefNannyDeclarations
   11318           0 :   PyObject *__pyx_t_1 = NULL;
   11319           0 :   PyObject *__pyx_t_2 = NULL;
   11320           0 :   int __pyx_lineno = 0;
   11321           0 :   const char *__pyx_filename = NULL;
   11322           0 :   int __pyx_clineno = 0;
   11323           0 :   __Pyx_RefNannySetupContext("__str__", 1);
   11324             : 
   11325             :   /* "View.MemoryView":621
   11326             :  * 
   11327             :  *     def __str__(self):
   11328             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
   11329             :  * 
   11330             :  * 
   11331             :  */
   11332           0 :   __Pyx_XDECREF(__pyx_r);
   11333           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11334           0 :   __Pyx_GOTREF(__pyx_t_1);
   11335           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11336           0 :   __Pyx_GOTREF(__pyx_t_2);
   11337           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11338           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11339           0 :   __Pyx_GOTREF(__pyx_t_1);
   11340           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11341           0 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11342           0 :   __Pyx_GOTREF(__pyx_t_2);
   11343           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11344           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
   11345           0 :   __pyx_t_1 = 0;
   11346           0 :   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11347           0 :   __Pyx_GOTREF(__pyx_t_1);
   11348           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11349           0 :   __pyx_r = __pyx_t_1;
   11350           0 :   __pyx_t_1 = 0;
   11351           0 :   goto __pyx_L0;
   11352             : 
   11353             :   /* "View.MemoryView":620
   11354             :  *                                                id(self))
   11355             :  * 
   11356             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11357             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11358             :  * 
   11359             :  */
   11360             : 
   11361             :   /* function exit code */
   11362           0 :   __pyx_L1_error:;
   11363           0 :   __Pyx_XDECREF(__pyx_t_1);
   11364           0 :   __Pyx_XDECREF(__pyx_t_2);
   11365           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11366           0 :   __pyx_r = NULL;
   11367           0 :   __pyx_L0:;
   11368           0 :   __Pyx_XGIVEREF(__pyx_r);
   11369           0 :   __Pyx_RefNannyFinishContext();
   11370           0 :   return __pyx_r;
   11371             : }
   11372             : 
   11373             : /* "View.MemoryView":624
   11374             :  * 
   11375             :  * 
   11376             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11377             :  *         cdef __Pyx_memviewslice *mslice
   11378             :  *         cdef __Pyx_memviewslice tmp
   11379             :  */
   11380             : 
   11381             : /* Python wrapper */
   11382             : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11383             : #if CYTHON_METH_FASTCALL
   11384             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11385             : #else
   11386             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11387             : #endif
   11388             : ); /*proto*/
   11389           0 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11390             : #if CYTHON_METH_FASTCALL
   11391             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11392             : #else
   11393             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11394             : #endif
   11395             : ) {
   11396             :   #if !CYTHON_METH_FASTCALL
   11397             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11398             :   #endif
   11399           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11400           0 :   PyObject *__pyx_r = 0;
   11401             :   __Pyx_RefNannyDeclarations
   11402           0 :   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
   11403             :   #if !CYTHON_METH_FASTCALL
   11404             :   #if CYTHON_ASSUME_SAFE_MACROS
   11405             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11406             :   #else
   11407             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11408             :   #endif
   11409             :   #endif
   11410           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11411           0 :   if (unlikely(__pyx_nargs > 0)) {
   11412           0 :     __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11413           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
   11414           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11415             : 
   11416             :   /* function exit code */
   11417           0 :   __Pyx_RefNannyFinishContext();
   11418           0 :   return __pyx_r;
   11419             : }
   11420             : 
   11421           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11422           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11423           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11424           0 :   PyObject *__pyx_r = NULL;
   11425             :   __Pyx_RefNannyDeclarations
   11426           0 :   __Pyx_memviewslice *__pyx_t_1;
   11427           0 :   PyObject *__pyx_t_2 = NULL;
   11428           0 :   int __pyx_lineno = 0;
   11429           0 :   const char *__pyx_filename = NULL;
   11430           0 :   int __pyx_clineno = 0;
   11431           0 :   __Pyx_RefNannySetupContext("is_c_contig", 1);
   11432             : 
   11433             :   /* "View.MemoryView":627
   11434             :  *         cdef __Pyx_memviewslice *mslice
   11435             :  *         cdef __Pyx_memviewslice tmp
   11436             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11437             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11438             :  * 
   11439             :  */
   11440           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
   11441           0 :   __pyx_v_mslice = __pyx_t_1;
   11442             : 
   11443             :   /* "View.MemoryView":628
   11444             :  *         cdef __Pyx_memviewslice tmp
   11445             :  *         mslice = get_slice_from_memview(self, &tmp)
   11446             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
   11447             :  * 
   11448             :  *     def is_f_contig(self):
   11449             :  */
   11450           0 :   __Pyx_XDECREF(__pyx_r);
   11451           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
   11452           0 :   __Pyx_GOTREF(__pyx_t_2);
   11453           0 :   __pyx_r = __pyx_t_2;
   11454           0 :   __pyx_t_2 = 0;
   11455           0 :   goto __pyx_L0;
   11456             : 
   11457             :   /* "View.MemoryView":624
   11458             :  * 
   11459             :  * 
   11460             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11461             :  *         cdef __Pyx_memviewslice *mslice
   11462             :  *         cdef __Pyx_memviewslice tmp
   11463             :  */
   11464             : 
   11465             :   /* function exit code */
   11466           0 :   __pyx_L1_error:;
   11467           0 :   __Pyx_XDECREF(__pyx_t_2);
   11468           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11469           0 :   __pyx_r = NULL;
   11470           0 :   __pyx_L0:;
   11471           0 :   __Pyx_XGIVEREF(__pyx_r);
   11472           0 :   __Pyx_RefNannyFinishContext();
   11473           0 :   return __pyx_r;
   11474             : }
   11475             : 
   11476             : /* "View.MemoryView":630
   11477             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11478             :  * 
   11479             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11480             :  *         cdef __Pyx_memviewslice *mslice
   11481             :  *         cdef __Pyx_memviewslice tmp
   11482             :  */
   11483             : 
   11484             : /* Python wrapper */
   11485             : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11486             : #if CYTHON_METH_FASTCALL
   11487             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11488             : #else
   11489             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11490             : #endif
   11491             : ); /*proto*/
   11492           0 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11493             : #if CYTHON_METH_FASTCALL
   11494             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11495             : #else
   11496             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11497             : #endif
   11498             : ) {
   11499             :   #if !CYTHON_METH_FASTCALL
   11500             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11501             :   #endif
   11502           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11503           0 :   PyObject *__pyx_r = 0;
   11504             :   __Pyx_RefNannyDeclarations
   11505           0 :   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
   11506             :   #if !CYTHON_METH_FASTCALL
   11507             :   #if CYTHON_ASSUME_SAFE_MACROS
   11508             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11509             :   #else
   11510             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11511             :   #endif
   11512             :   #endif
   11513           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11514           0 :   if (unlikely(__pyx_nargs > 0)) {
   11515           0 :     __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11516           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
   11517           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11518             : 
   11519             :   /* function exit code */
   11520           0 :   __Pyx_RefNannyFinishContext();
   11521           0 :   return __pyx_r;
   11522             : }
   11523             : 
   11524           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11525           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11526           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11527           0 :   PyObject *__pyx_r = NULL;
   11528             :   __Pyx_RefNannyDeclarations
   11529           0 :   __Pyx_memviewslice *__pyx_t_1;
   11530           0 :   PyObject *__pyx_t_2 = NULL;
   11531           0 :   int __pyx_lineno = 0;
   11532           0 :   const char *__pyx_filename = NULL;
   11533           0 :   int __pyx_clineno = 0;
   11534           0 :   __Pyx_RefNannySetupContext("is_f_contig", 1);
   11535             : 
   11536             :   /* "View.MemoryView":633
   11537             :  *         cdef __Pyx_memviewslice *mslice
   11538             :  *         cdef __Pyx_memviewslice tmp
   11539             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11540             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11541             :  * 
   11542             :  */
   11543           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
   11544           0 :   __pyx_v_mslice = __pyx_t_1;
   11545             : 
   11546             :   /* "View.MemoryView":634
   11547             :  *         cdef __Pyx_memviewslice tmp
   11548             :  *         mslice = get_slice_from_memview(self, &tmp)
   11549             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
   11550             :  * 
   11551             :  *     def copy(self):
   11552             :  */
   11553           0 :   __Pyx_XDECREF(__pyx_r);
   11554           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
   11555           0 :   __Pyx_GOTREF(__pyx_t_2);
   11556           0 :   __pyx_r = __pyx_t_2;
   11557           0 :   __pyx_t_2 = 0;
   11558           0 :   goto __pyx_L0;
   11559             : 
   11560             :   /* "View.MemoryView":630
   11561             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11562             :  * 
   11563             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11564             :  *         cdef __Pyx_memviewslice *mslice
   11565             :  *         cdef __Pyx_memviewslice tmp
   11566             :  */
   11567             : 
   11568             :   /* function exit code */
   11569           0 :   __pyx_L1_error:;
   11570           0 :   __Pyx_XDECREF(__pyx_t_2);
   11571           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11572           0 :   __pyx_r = NULL;
   11573           0 :   __pyx_L0:;
   11574           0 :   __Pyx_XGIVEREF(__pyx_r);
   11575           0 :   __Pyx_RefNannyFinishContext();
   11576           0 :   return __pyx_r;
   11577             : }
   11578             : 
   11579             : /* "View.MemoryView":636
   11580             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11581             :  * 
   11582             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11583             :  *         cdef __Pyx_memviewslice mslice
   11584             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11585             :  */
   11586             : 
   11587             : /* Python wrapper */
   11588             : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11589             : #if CYTHON_METH_FASTCALL
   11590             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11591             : #else
   11592             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11593             : #endif
   11594             : ); /*proto*/
   11595           0 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11596             : #if CYTHON_METH_FASTCALL
   11597             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11598             : #else
   11599             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11600             : #endif
   11601             : ) {
   11602             :   #if !CYTHON_METH_FASTCALL
   11603             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11604             :   #endif
   11605           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11606           0 :   PyObject *__pyx_r = 0;
   11607             :   __Pyx_RefNannyDeclarations
   11608           0 :   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
   11609             :   #if !CYTHON_METH_FASTCALL
   11610             :   #if CYTHON_ASSUME_SAFE_MACROS
   11611             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11612             :   #else
   11613             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11614             :   #endif
   11615             :   #endif
   11616           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11617           0 :   if (unlikely(__pyx_nargs > 0)) {
   11618           0 :     __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
   11619           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
   11620           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11621             : 
   11622             :   /* function exit code */
   11623           0 :   __Pyx_RefNannyFinishContext();
   11624           0 :   return __pyx_r;
   11625             : }
   11626             : 
   11627           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
   11628           0 :   __Pyx_memviewslice __pyx_v_mslice;
   11629           0 :   int __pyx_v_flags;
   11630           0 :   PyObject *__pyx_r = NULL;
   11631             :   __Pyx_RefNannyDeclarations
   11632           0 :   __Pyx_memviewslice __pyx_t_1;
   11633           0 :   PyObject *__pyx_t_2 = NULL;
   11634           0 :   int __pyx_lineno = 0;
   11635           0 :   const char *__pyx_filename = NULL;
   11636           0 :   int __pyx_clineno = 0;
   11637           0 :   __Pyx_RefNannySetupContext("copy", 1);
   11638             : 
   11639             :   /* "View.MemoryView":638
   11640             :  *     def copy(self):
   11641             :  *         cdef __Pyx_memviewslice mslice
   11642             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
   11643             :  * 
   11644             :  *         slice_copy(self, &mslice)
   11645             :  */
   11646           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
   11647             : 
   11648             :   /* "View.MemoryView":640
   11649             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11650             :  * 
   11651             :  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
   11652             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
   11653             :  *                                    self.view.itemsize,
   11654             :  */
   11655           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
   11656             : 
   11657             :   /* "View.MemoryView":641
   11658             :  * 
   11659             :  *         slice_copy(self, &mslice)
   11660             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
   11661             :  *                                    self.view.itemsize,
   11662             :  *                                    flags|PyBUF_C_CONTIGUOUS,
   11663             :  */
   11664           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
   11665           0 :   __pyx_v_mslice = __pyx_t_1;
   11666             : 
   11667             :   /* "View.MemoryView":646
   11668             :  *                                    self.dtype_is_object)
   11669             :  * 
   11670             :  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
   11671             :  * 
   11672             :  *     def copy_fortran(self):
   11673             :  */
   11674           0 :   __Pyx_XDECREF(__pyx_r);
   11675           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
   11676           0 :   __Pyx_GOTREF(__pyx_t_2);
   11677           0 :   __pyx_r = __pyx_t_2;
   11678           0 :   __pyx_t_2 = 0;
   11679           0 :   goto __pyx_L0;
   11680             : 
   11681             :   /* "View.MemoryView":636
   11682             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11683             :  * 
   11684             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11685             :  *         cdef __Pyx_memviewslice mslice
   11686             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11687             :  */
   11688             : 
   11689             :   /* function exit code */
   11690           0 :   __pyx_L1_error:;
   11691           0 :   __Pyx_XDECREF(__pyx_t_2);
   11692           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11693           0 :   __pyx_r = NULL;
   11694           0 :   __pyx_L0:;
   11695           0 :   __Pyx_XGIVEREF(__pyx_r);
   11696           0 :   __Pyx_RefNannyFinishContext();
   11697           0 :   return __pyx_r;
   11698             : }
   11699             : 
   11700             : /* "View.MemoryView":648
   11701             :  *         return memoryview_copy_from_slice(self, &mslice)
   11702             :  * 
   11703             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11704             :  *         cdef __Pyx_memviewslice src, dst
   11705             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11706             :  */
   11707             : 
   11708             : /* Python wrapper */
   11709             : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11710             : #if CYTHON_METH_FASTCALL
   11711             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11712             : #else
   11713             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11714             : #endif
   11715             : ); /*proto*/
   11716           0 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11717             : #if CYTHON_METH_FASTCALL
   11718             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11719             : #else
   11720             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11721             : #endif
   11722             : ) {
   11723             :   #if !CYTHON_METH_FASTCALL
   11724             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11725             :   #endif
   11726           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11727           0 :   PyObject *__pyx_r = 0;
   11728             :   __Pyx_RefNannyDeclarations
   11729           0 :   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
   11730             :   #if !CYTHON_METH_FASTCALL
   11731             :   #if CYTHON_ASSUME_SAFE_MACROS
   11732             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11733             :   #else
   11734             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11735             :   #endif
   11736             :   #endif
   11737           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11738           0 :   if (unlikely(__pyx_nargs > 0)) {
   11739           0 :     __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
   11740           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
   11741           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11742             : 
   11743             :   /* function exit code */
   11744           0 :   __Pyx_RefNannyFinishContext();
   11745           0 :   return __pyx_r;
   11746             : }
   11747             : 
   11748           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
   11749           0 :   __Pyx_memviewslice __pyx_v_src;
   11750           0 :   __Pyx_memviewslice __pyx_v_dst;
   11751           0 :   int __pyx_v_flags;
   11752           0 :   PyObject *__pyx_r = NULL;
   11753             :   __Pyx_RefNannyDeclarations
   11754           0 :   __Pyx_memviewslice __pyx_t_1;
   11755           0 :   PyObject *__pyx_t_2 = NULL;
   11756           0 :   int __pyx_lineno = 0;
   11757           0 :   const char *__pyx_filename = NULL;
   11758           0 :   int __pyx_clineno = 0;
   11759           0 :   __Pyx_RefNannySetupContext("copy_fortran", 1);
   11760             : 
   11761             :   /* "View.MemoryView":650
   11762             :  *     def copy_fortran(self):
   11763             :  *         cdef __Pyx_memviewslice src, dst
   11764             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
   11765             :  * 
   11766             :  *         slice_copy(self, &src)
   11767             :  */
   11768           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
   11769             : 
   11770             :   /* "View.MemoryView":652
   11771             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11772             :  * 
   11773             :  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
   11774             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
   11775             :  *                                 self.view.itemsize,
   11776             :  */
   11777           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
   11778             : 
   11779             :   /* "View.MemoryView":653
   11780             :  * 
   11781             :  *         slice_copy(self, &src)
   11782             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
   11783             :  *                                 self.view.itemsize,
   11784             :  *                                 flags|PyBUF_F_CONTIGUOUS,
   11785             :  */
   11786           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
   11787           0 :   __pyx_v_dst = __pyx_t_1;
   11788             : 
   11789             :   /* "View.MemoryView":658
   11790             :  *                                 self.dtype_is_object)
   11791             :  * 
   11792             :  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
   11793             :  * 
   11794             :  * 
   11795             :  */
   11796           0 :   __Pyx_XDECREF(__pyx_r);
   11797           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
   11798           0 :   __Pyx_GOTREF(__pyx_t_2);
   11799           0 :   __pyx_r = __pyx_t_2;
   11800           0 :   __pyx_t_2 = 0;
   11801           0 :   goto __pyx_L0;
   11802             : 
   11803             :   /* "View.MemoryView":648
   11804             :  *         return memoryview_copy_from_slice(self, &mslice)
   11805             :  * 
   11806             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11807             :  *         cdef __Pyx_memviewslice src, dst
   11808             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11809             :  */
   11810             : 
   11811             :   /* function exit code */
   11812           0 :   __pyx_L1_error:;
   11813           0 :   __Pyx_XDECREF(__pyx_t_2);
   11814           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11815           0 :   __pyx_r = NULL;
   11816           0 :   __pyx_L0:;
   11817           0 :   __Pyx_XGIVEREF(__pyx_r);
   11818           0 :   __Pyx_RefNannyFinishContext();
   11819           0 :   return __pyx_r;
   11820             : }
   11821             : 
   11822             : /* "(tree fragment)":1
   11823             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11824             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11825             :  * def __setstate_cython__(self, __pyx_state):
   11826             :  */
   11827             : 
   11828             : /* Python wrapper */
   11829             : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11830             : #if CYTHON_METH_FASTCALL
   11831             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11832             : #else
   11833             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11834             : #endif
   11835             : ); /*proto*/
   11836           0 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11837             : #if CYTHON_METH_FASTCALL
   11838             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11839             : #else
   11840             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11841             : #endif
   11842             : ) {
   11843             :   #if !CYTHON_METH_FASTCALL
   11844             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11845             :   #endif
   11846           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11847           0 :   PyObject *__pyx_r = 0;
   11848             :   __Pyx_RefNannyDeclarations
   11849           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   11850             :   #if !CYTHON_METH_FASTCALL
   11851             :   #if CYTHON_ASSUME_SAFE_MACROS
   11852             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11853             :   #else
   11854             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11855             :   #endif
   11856             :   #endif
   11857           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11858           0 :   if (unlikely(__pyx_nargs > 0)) {
   11859           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   11860           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   11861           0 :   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11862             : 
   11863             :   /* function exit code */
   11864           0 :   __Pyx_RefNannyFinishContext();
   11865           0 :   return __pyx_r;
   11866             : }
   11867             : 
   11868           0 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
   11869           0 :   PyObject *__pyx_r = NULL;
   11870             :   __Pyx_RefNannyDeclarations
   11871           0 :   int __pyx_lineno = 0;
   11872           0 :   const char *__pyx_filename = NULL;
   11873           0 :   int __pyx_clineno = 0;
   11874           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   11875             : 
   11876             :   /* "(tree fragment)":2
   11877             :  * def __reduce_cython__(self):
   11878             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   11879             :  * def __setstate_cython__(self, __pyx_state):
   11880             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11881             :  */
   11882           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   11883           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   11884             : 
   11885             :   /* "(tree fragment)":1
   11886             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11887             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11888             :  * def __setstate_cython__(self, __pyx_state):
   11889             :  */
   11890             : 
   11891             :   /* function exit code */
   11892           0 :   __pyx_L1_error:;
   11893           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11894           0 :   __pyx_r = NULL;
   11895           0 :   __Pyx_XGIVEREF(__pyx_r);
   11896           0 :   __Pyx_RefNannyFinishContext();
   11897           0 :   return __pyx_r;
   11898             : }
   11899             : 
   11900             : /* "(tree fragment)":3
   11901             :  * def __reduce_cython__(self):
   11902             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11903             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   11904             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11905             :  */
   11906             : 
   11907             : /* Python wrapper */
   11908             : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11909             : #if CYTHON_METH_FASTCALL
   11910             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11911             : #else
   11912             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11913             : #endif
   11914             : ); /*proto*/
   11915           0 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11916             : #if CYTHON_METH_FASTCALL
   11917             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11918             : #else
   11919             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11920             : #endif
   11921             : ) {
   11922           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   11923             :   #if !CYTHON_METH_FASTCALL
   11924             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11925             :   #endif
   11926           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11927           0 :   PyObject* values[1] = {0};
   11928           0 :   int __pyx_lineno = 0;
   11929           0 :   const char *__pyx_filename = NULL;
   11930           0 :   int __pyx_clineno = 0;
   11931           0 :   PyObject *__pyx_r = 0;
   11932             :   __Pyx_RefNannyDeclarations
   11933           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   11934             :   #if !CYTHON_METH_FASTCALL
   11935             :   #if CYTHON_ASSUME_SAFE_MACROS
   11936             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11937             :   #else
   11938             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11939             :   #endif
   11940             :   #endif
   11941           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11942             :   {
   11943           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   11944           0 :     if (__pyx_kwds) {
   11945           0 :       Py_ssize_t kw_args;
   11946           0 :       switch (__pyx_nargs) {
   11947           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11948           0 :         CYTHON_FALLTHROUGH;
   11949           0 :         case  0: break;
   11950           0 :         default: goto __pyx_L5_argtuple_error;
   11951             :       }
   11952           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   11953           0 :       switch (__pyx_nargs) {
   11954             :         case  0:
   11955           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   11956           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   11957           0 :           kw_args--;
   11958             :         }
   11959           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   11960           0 :         else goto __pyx_L5_argtuple_error;
   11961             :       }
   11962           0 :       if (unlikely(kw_args > 0)) {
   11963           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   11964           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   11965             :       }
   11966           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   11967           0 :       goto __pyx_L5_argtuple_error;
   11968             :     } else {
   11969           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11970             :     }
   11971           0 :     __pyx_v___pyx_state = values[0];
   11972             :   }
   11973           0 :   goto __pyx_L6_skip;
   11974           0 :   __pyx_L5_argtuple_error:;
   11975           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   11976           0 :   __pyx_L6_skip:;
   11977           0 :   goto __pyx_L4_argument_unpacking_done;
   11978           0 :   __pyx_L3_error:;
   11979             :   {
   11980           0 :     Py_ssize_t __pyx_temp;
   11981           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11982             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11983             :     }
   11984             :   }
   11985           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11986           0 :   __Pyx_RefNannyFinishContext();
   11987           0 :   return NULL;
   11988           0 :   __pyx_L4_argument_unpacking_done:;
   11989           0 :   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
   11990             : 
   11991             :   /* function exit code */
   11992             :   {
   11993           0 :     Py_ssize_t __pyx_temp;
   11994           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11995             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11996             :     }
   11997             :   }
   11998             :   __Pyx_RefNannyFinishContext();
   11999             :   return __pyx_r;
   12000             : }
   12001             : 
   12002           0 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   12003           0 :   PyObject *__pyx_r = NULL;
   12004             :   __Pyx_RefNannyDeclarations
   12005           0 :   int __pyx_lineno = 0;
   12006           0 :   const char *__pyx_filename = NULL;
   12007           0 :   int __pyx_clineno = 0;
   12008           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   12009             : 
   12010             :   /* "(tree fragment)":4
   12011             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12012             :  * def __setstate_cython__(self, __pyx_state):
   12013             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   12014             :  */
   12015           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   12016           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   12017             : 
   12018             :   /* "(tree fragment)":3
   12019             :  * def __reduce_cython__(self):
   12020             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12021             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   12022             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12023             :  */
   12024             : 
   12025             :   /* function exit code */
   12026           0 :   __pyx_L1_error:;
   12027           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12028           0 :   __pyx_r = NULL;
   12029           0 :   __Pyx_XGIVEREF(__pyx_r);
   12030           0 :   __Pyx_RefNannyFinishContext();
   12031           0 :   return __pyx_r;
   12032             : }
   12033             : 
   12034             : /* "View.MemoryView":662
   12035             :  * 
   12036             :  * @cname('__pyx_memoryview_new')
   12037             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   12038             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12039             :  *     result.typeinfo = typeinfo
   12040             :  */
   12041             : 
   12042         772 : static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
   12043         772 :   struct __pyx_memoryview_obj *__pyx_v_result = 0;
   12044         772 :   PyObject *__pyx_r = NULL;
   12045             :   __Pyx_RefNannyDeclarations
   12046         772 :   PyObject *__pyx_t_1 = NULL;
   12047         772 :   PyObject *__pyx_t_2 = NULL;
   12048         772 :   PyObject *__pyx_t_3 = NULL;
   12049         772 :   int __pyx_lineno = 0;
   12050         772 :   const char *__pyx_filename = NULL;
   12051         772 :   int __pyx_clineno = 0;
   12052         772 :   __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);
   12053             : 
   12054             :   /* "View.MemoryView":663
   12055             :  * @cname('__pyx_memoryview_new')
   12056             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   12057             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
   12058             :  *     result.typeinfo = typeinfo
   12059             :  *     return result
   12060             :  */
   12061         772 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
   12062         772 :   __Pyx_GOTREF(__pyx_t_1);
   12063         772 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   12064         772 :   __Pyx_GOTREF(__pyx_t_2);
   12065         772 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
   12066         772 :   __Pyx_GOTREF(__pyx_t_3);
   12067         772 :   __Pyx_INCREF(__pyx_v_o);
   12068         772 :   __Pyx_GIVEREF(__pyx_v_o);
   12069         772 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
   12070         772 :   __Pyx_GIVEREF(__pyx_t_1);
   12071         772 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
   12072         772 :   __Pyx_GIVEREF(__pyx_t_2);
   12073         772 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
   12074         772 :   __pyx_t_1 = 0;
   12075         772 :   __pyx_t_2 = 0;
   12076         772 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   12077         772 :   __Pyx_GOTREF(__pyx_t_2);
   12078         772 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12079         772 :   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   12080         772 :   __pyx_t_2 = 0;
   12081             : 
   12082             :   /* "View.MemoryView":664
   12083             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   12084             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12085             :  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
   12086             :  *     return result
   12087             :  * 
   12088             :  */
   12089         772 :   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
   12090             : 
   12091             :   /* "View.MemoryView":665
   12092             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12093             :  *     result.typeinfo = typeinfo
   12094             :  *     return result             # <<<<<<<<<<<<<<
   12095             :  * 
   12096             :  * @cname('__pyx_memoryview_check')
   12097             :  */
   12098         772 :   __Pyx_XDECREF(__pyx_r);
   12099         772 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   12100         772 :   __pyx_r = ((PyObject *)__pyx_v_result);
   12101         772 :   goto __pyx_L0;
   12102             : 
   12103             :   /* "View.MemoryView":662
   12104             :  * 
   12105             :  * @cname('__pyx_memoryview_new')
   12106             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   12107             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12108             :  *     result.typeinfo = typeinfo
   12109             :  */
   12110             : 
   12111             :   /* function exit code */
   12112           0 :   __pyx_L1_error:;
   12113           0 :   __Pyx_XDECREF(__pyx_t_1);
   12114           0 :   __Pyx_XDECREF(__pyx_t_2);
   12115           0 :   __Pyx_XDECREF(__pyx_t_3);
   12116           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12117           0 :   __pyx_r = 0;
   12118         772 :   __pyx_L0:;
   12119         772 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   12120         772 :   __Pyx_XGIVEREF(__pyx_r);
   12121         772 :   __Pyx_RefNannyFinishContext();
   12122         772 :   return __pyx_r;
   12123             : }
   12124             : 
   12125             : /* "View.MemoryView":668
   12126             :  * 
   12127             :  * @cname('__pyx_memoryview_check')
   12128             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   12129             :  *     return isinstance(o, memoryview)
   12130             :  * 
   12131             :  */
   12132             : 
   12133         772 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
   12134         772 :   int __pyx_r;
   12135         772 :   int __pyx_t_1;
   12136             : 
   12137             :   /* "View.MemoryView":669
   12138             :  * @cname('__pyx_memoryview_check')
   12139             :  * cdef inline bint memoryview_check(object o) noexcept:
   12140             :  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
   12141             :  * 
   12142             :  * cdef tuple _unellipsify(object index, int ndim):
   12143             :  */
   12144         772 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
   12145         772 :   __pyx_r = __pyx_t_1;
   12146         772 :   goto __pyx_L0;
   12147             : 
   12148             :   /* "View.MemoryView":668
   12149             :  * 
   12150             :  * @cname('__pyx_memoryview_check')
   12151             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   12152             :  *     return isinstance(o, memoryview)
   12153             :  * 
   12154             :  */
   12155             : 
   12156             :   /* function exit code */
   12157         772 :   __pyx_L0:;
   12158         772 :   return __pyx_r;
   12159             : }
   12160             : 
   12161             : /* "View.MemoryView":671
   12162             :  *     return isinstance(o, memoryview)
   12163             :  * 
   12164             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12165             :  *     """
   12166             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12167             :  */
   12168             : 
   12169           0 : static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
   12170           0 :   Py_ssize_t __pyx_v_idx;
   12171           0 :   PyObject *__pyx_v_tup = NULL;
   12172           0 :   PyObject *__pyx_v_result = NULL;
   12173           0 :   int __pyx_v_have_slices;
   12174           0 :   int __pyx_v_seen_ellipsis;
   12175           0 :   PyObject *__pyx_v_item = NULL;
   12176           0 :   Py_ssize_t __pyx_v_nslices;
   12177           0 :   PyObject *__pyx_r = NULL;
   12178             :   __Pyx_RefNannyDeclarations
   12179           0 :   PyObject *__pyx_t_1 = NULL;
   12180           0 :   int __pyx_t_2;
   12181           0 :   PyObject *__pyx_t_3 = NULL;
   12182           0 :   Py_ssize_t __pyx_t_4;
   12183           0 :   Py_ssize_t __pyx_t_5;
   12184           0 :   Py_UCS4 __pyx_t_6;
   12185           0 :   PyObject *__pyx_t_7 = NULL;
   12186           0 :   int __pyx_lineno = 0;
   12187           0 :   const char *__pyx_filename = NULL;
   12188           0 :   int __pyx_clineno = 0;
   12189           0 :   __Pyx_RefNannySetupContext("_unellipsify", 1);
   12190             : 
   12191             :   /* "View.MemoryView":677
   12192             :  *     """
   12193             :  *     cdef Py_ssize_t idx
   12194             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
   12195             :  * 
   12196             :  *     result = [slice(None)] * ndim
   12197             :  */
   12198           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
   12199           0 :   if (__pyx_t_2) {
   12200           0 :     __Pyx_INCREF(((PyObject*)__pyx_v_index));
   12201             :     __pyx_t_1 = __pyx_v_index;
   12202             :   } else {
   12203           0 :     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
   12204           0 :     __Pyx_GOTREF(__pyx_t_3);
   12205           0 :     __Pyx_INCREF(__pyx_v_index);
   12206           0 :     __Pyx_GIVEREF(__pyx_v_index);
   12207           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
   12208           0 :     __pyx_t_1 = __pyx_t_3;
   12209           0 :     __pyx_t_3 = 0;
   12210             :   }
   12211           0 :   __pyx_v_tup = ((PyObject*)__pyx_t_1);
   12212           0 :   __pyx_t_1 = 0;
   12213             : 
   12214             :   /* "View.MemoryView":679
   12215             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   12216             :  * 
   12217             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   12218             :  *     have_slices = False
   12219             :  *     seen_ellipsis = False
   12220             :  */
   12221           0 :   __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
   12222             :   __Pyx_GOTREF(__pyx_t_1);
   12223             :   { Py_ssize_t __pyx_temp;
   12224           0 :     for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
   12225           0 :       __Pyx_INCREF(__pyx_slice__5);
   12226           0 :       __Pyx_GIVEREF(__pyx_slice__5);
   12227           0 :       if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error);
   12228             :     }
   12229             :   }
   12230           0 :   __pyx_v_result = ((PyObject*)__pyx_t_1);
   12231           0 :   __pyx_t_1 = 0;
   12232             : 
   12233             :   /* "View.MemoryView":680
   12234             :  * 
   12235             :  *     result = [slice(None)] * ndim
   12236             :  *     have_slices = False             # <<<<<<<<<<<<<<
   12237             :  *     seen_ellipsis = False
   12238             :  *     idx = 0
   12239             :  */
   12240           0 :   __pyx_v_have_slices = 0;
   12241             : 
   12242             :   /* "View.MemoryView":681
   12243             :  *     result = [slice(None)] * ndim
   12244             :  *     have_slices = False
   12245             :  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
   12246             :  *     idx = 0
   12247             :  *     for item in tup:
   12248             :  */
   12249           0 :   __pyx_v_seen_ellipsis = 0;
   12250             : 
   12251             :   /* "View.MemoryView":682
   12252             :  *     have_slices = False
   12253             :  *     seen_ellipsis = False
   12254             :  *     idx = 0             # <<<<<<<<<<<<<<
   12255             :  *     for item in tup:
   12256             :  *         if item is Ellipsis:
   12257             :  */
   12258           0 :   __pyx_v_idx = 0;
   12259             : 
   12260             :   /* "View.MemoryView":683
   12261             :  *     seen_ellipsis = False
   12262             :  *     idx = 0
   12263             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12264             :  *         if item is Ellipsis:
   12265             :  *             if not seen_ellipsis:
   12266             :  */
   12267           0 :   if (unlikely(__pyx_v_tup == Py_None)) {
   12268           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   12269           0 :     __PYX_ERR(1, 683, __pyx_L1_error)
   12270             :   }
   12271           0 :   __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
   12272             :   __pyx_t_4 = 0;
   12273           0 :   for (;;) {
   12274           0 :     {
   12275           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
   12276             :       #if !CYTHON_ASSUME_SAFE_MACROS
   12277             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12278             :       #endif
   12279           0 :       if (__pyx_t_4 >= __pyx_temp) break;
   12280             :     }
   12281             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12282           0 :     __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12283             :     #else
   12284             :     __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
   12285             :     __Pyx_GOTREF(__pyx_t_3);
   12286             :     #endif
   12287           0 :     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
   12288           0 :     __pyx_t_3 = 0;
   12289             : 
   12290             :     /* "View.MemoryView":684
   12291             :  *     idx = 0
   12292             :  *     for item in tup:
   12293             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12294             :  *             if not seen_ellipsis:
   12295             :  *                 idx += ndim - len(tup)
   12296             :  */
   12297           0 :     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
   12298           0 :     if (__pyx_t_2) {
   12299             : 
   12300             :       /* "View.MemoryView":685
   12301             :  *     for item in tup:
   12302             :  *         if item is Ellipsis:
   12303             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12304             :  *                 idx += ndim - len(tup)
   12305             :  *                 seen_ellipsis = True
   12306             :  */
   12307           0 :       __pyx_t_2 = (!__pyx_v_seen_ellipsis);
   12308           0 :       if (__pyx_t_2) {
   12309             : 
   12310             :         /* "View.MemoryView":686
   12311             :  *         if item is Ellipsis:
   12312             :  *             if not seen_ellipsis:
   12313             :  *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
   12314             :  *                 seen_ellipsis = True
   12315             :  *             have_slices = True
   12316             :  */
   12317           0 :         if (unlikely(__pyx_v_tup == Py_None)) {
   12318             :           PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   12319             :           __PYX_ERR(1, 686, __pyx_L1_error)
   12320             :         }
   12321           0 :         __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
   12322           0 :         __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));
   12323             : 
   12324             :         /* "View.MemoryView":687
   12325             :  *             if not seen_ellipsis:
   12326             :  *                 idx += ndim - len(tup)
   12327             :  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
   12328             :  *             have_slices = True
   12329             :  *         else:
   12330             :  */
   12331           0 :         __pyx_v_seen_ellipsis = 1;
   12332             : 
   12333             :         /* "View.MemoryView":685
   12334             :  *     for item in tup:
   12335             :  *         if item is Ellipsis:
   12336             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12337             :  *                 idx += ndim - len(tup)
   12338             :  *                 seen_ellipsis = True
   12339             :  */
   12340             :       }
   12341             : 
   12342             :       /* "View.MemoryView":688
   12343             :  *                 idx += ndim - len(tup)
   12344             :  *                 seen_ellipsis = True
   12345             :  *             have_slices = True             # <<<<<<<<<<<<<<
   12346             :  *         else:
   12347             :  *             if isinstance(item, slice):
   12348             :  */
   12349           0 :       __pyx_v_have_slices = 1;
   12350             : 
   12351             :       /* "View.MemoryView":684
   12352             :  *     idx = 0
   12353             :  *     for item in tup:
   12354             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12355             :  *             if not seen_ellipsis:
   12356             :  *                 idx += ndim - len(tup)
   12357             :  */
   12358           0 :       goto __pyx_L5;
   12359             :     }
   12360             : 
   12361             :     /* "View.MemoryView":690
   12362             :  *             have_slices = True
   12363             :  *         else:
   12364             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12365             :  *                 have_slices = True
   12366             :  *             elif not PyIndex_Check(item):
   12367             :  */
   12368             :     /*else*/ {
   12369           0 :       __pyx_t_2 = PySlice_Check(__pyx_v_item); 
   12370           0 :       if (__pyx_t_2) {
   12371             : 
   12372             :         /* "View.MemoryView":691
   12373             :  *         else:
   12374             :  *             if isinstance(item, slice):
   12375             :  *                 have_slices = True             # <<<<<<<<<<<<<<
   12376             :  *             elif not PyIndex_Check(item):
   12377             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12378             :  */
   12379           0 :         __pyx_v_have_slices = 1;
   12380             : 
   12381             :         /* "View.MemoryView":690
   12382             :  *             have_slices = True
   12383             :  *         else:
   12384             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12385             :  *                 have_slices = True
   12386             :  *             elif not PyIndex_Check(item):
   12387             :  */
   12388           0 :         goto __pyx_L7;
   12389             :       }
   12390             : 
   12391             :       /* "View.MemoryView":692
   12392             :  *             if isinstance(item, slice):
   12393             :  *                 have_slices = True
   12394             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12395             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12396             :  *             result[idx] = item
   12397             :  */
   12398           0 :       __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
   12399           0 :       if (unlikely(__pyx_t_2)) {
   12400             : 
   12401             :         /* "View.MemoryView":693
   12402             :  *                 have_slices = True
   12403             :  *             elif not PyIndex_Check(item):
   12404             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
   12405             :  *             result[idx] = item
   12406             :  *         idx += 1
   12407             :  */
   12408           0 :         __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
   12409           0 :         __Pyx_GOTREF(__pyx_t_3);
   12410           0 :         __pyx_t_5 = 0;
   12411           0 :         __pyx_t_6 = 127;
   12412           0 :         __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
   12413           0 :         __pyx_t_5 += 24;
   12414           0 :         __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
   12415           0 :         PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
   12416           0 :         __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12417           0 :         __Pyx_GOTREF(__pyx_t_7);
   12418           0 :         __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
   12419           0 :         __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
   12420           0 :         __Pyx_GIVEREF(__pyx_t_7);
   12421           0 :         PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
   12422           0 :         __pyx_t_7 = 0;
   12423           0 :         __Pyx_INCREF(__pyx_kp_u__6);
   12424           0 :         __pyx_t_5 += 1;
   12425           0 :         __Pyx_GIVEREF(__pyx_kp_u__6);
   12426           0 :         PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6);
   12427           0 :         __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12428           0 :         __Pyx_GOTREF(__pyx_t_7);
   12429           0 :         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12430           0 :         __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
   12431           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   12432           0 :         __PYX_ERR(1, 693, __pyx_L1_error)
   12433             : 
   12434             :         /* "View.MemoryView":692
   12435             :  *             if isinstance(item, slice):
   12436             :  *                 have_slices = True
   12437             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12438             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12439             :  *             result[idx] = item
   12440             :  */
   12441             :       }
   12442           0 :       __pyx_L7:;
   12443             : 
   12444             :       /* "View.MemoryView":694
   12445             :  *             elif not PyIndex_Check(item):
   12446             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12447             :  *             result[idx] = item             # <<<<<<<<<<<<<<
   12448             :  *         idx += 1
   12449             :  * 
   12450             :  */
   12451           0 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
   12452             :     }
   12453           0 :     __pyx_L5:;
   12454             : 
   12455             :     /* "View.MemoryView":695
   12456             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12457             :  *             result[idx] = item
   12458             :  *         idx += 1             # <<<<<<<<<<<<<<
   12459             :  * 
   12460             :  *     nslices = ndim - idx
   12461             :  */
   12462           0 :     __pyx_v_idx = (__pyx_v_idx + 1);
   12463             : 
   12464             :     /* "View.MemoryView":683
   12465             :  *     seen_ellipsis = False
   12466             :  *     idx = 0
   12467             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12468             :  *         if item is Ellipsis:
   12469             :  *             if not seen_ellipsis:
   12470             :  */
   12471             :   }
   12472           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   12473             : 
   12474             :   /* "View.MemoryView":697
   12475             :  *         idx += 1
   12476             :  * 
   12477             :  *     nslices = ndim - idx             # <<<<<<<<<<<<<<
   12478             :  *     return have_slices or nslices, tuple(result)
   12479             :  * 
   12480             :  */
   12481           0 :   __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);
   12482             : 
   12483             :   /* "View.MemoryView":698
   12484             :  * 
   12485             :  *     nslices = ndim - idx
   12486             :  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
   12487             :  * 
   12488             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12489             :  */
   12490           0 :   __Pyx_XDECREF(__pyx_r);
   12491           0 :   if (!__pyx_v_have_slices) {
   12492           0 :   } else {
   12493           0 :     __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12494           0 :     __Pyx_GOTREF(__pyx_t_7);
   12495           0 :     __pyx_t_1 = __pyx_t_7;
   12496           0 :     __pyx_t_7 = 0;
   12497           0 :     goto __pyx_L9_bool_binop_done;
   12498             :   }
   12499           0 :   __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12500             :   __Pyx_GOTREF(__pyx_t_7);
   12501             :   __pyx_t_1 = __pyx_t_7;
   12502           0 :   __pyx_t_7 = 0;
   12503           0 :   __pyx_L9_bool_binop_done:;
   12504           0 :   __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12505           0 :   __Pyx_GOTREF(__pyx_t_7);
   12506           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
   12507           0 :   __Pyx_GOTREF(__pyx_t_3);
   12508           0 :   __Pyx_GIVEREF(__pyx_t_1);
   12509           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
   12510           0 :   __Pyx_GIVEREF(__pyx_t_7);
   12511           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
   12512           0 :   __pyx_t_1 = 0;
   12513           0 :   __pyx_t_7 = 0;
   12514           0 :   __pyx_r = ((PyObject*)__pyx_t_3);
   12515           0 :   __pyx_t_3 = 0;
   12516           0 :   goto __pyx_L0;
   12517             : 
   12518             :   /* "View.MemoryView":671
   12519             :  *     return isinstance(o, memoryview)
   12520             :  * 
   12521             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12522             :  *     """
   12523             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12524             :  */
   12525             : 
   12526             :   /* function exit code */
   12527           0 :   __pyx_L1_error:;
   12528           0 :   __Pyx_XDECREF(__pyx_t_1);
   12529           0 :   __Pyx_XDECREF(__pyx_t_3);
   12530           0 :   __Pyx_XDECREF(__pyx_t_7);
   12531           0 :   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12532           0 :   __pyx_r = 0;
   12533           0 :   __pyx_L0:;
   12534           0 :   __Pyx_XDECREF(__pyx_v_tup);
   12535           0 :   __Pyx_XDECREF(__pyx_v_result);
   12536           0 :   __Pyx_XDECREF(__pyx_v_item);
   12537           0 :   __Pyx_XGIVEREF(__pyx_r);
   12538           0 :   __Pyx_RefNannyFinishContext();
   12539           0 :   return __pyx_r;
   12540             : }
   12541             : 
   12542             : /* "View.MemoryView":700
   12543             :  *     return have_slices or nslices, tuple(result)
   12544             :  * 
   12545             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12546             :  *     for suboffset in suboffsets[:ndim]:
   12547             :  *         if suboffset >= 0:
   12548             :  */
   12549             : 
   12550           0 : static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
   12551           0 :   Py_ssize_t __pyx_v_suboffset;
   12552           0 :   int __pyx_r;
   12553           0 :   Py_ssize_t *__pyx_t_1;
   12554           0 :   Py_ssize_t *__pyx_t_2;
   12555           0 :   Py_ssize_t *__pyx_t_3;
   12556           0 :   int __pyx_t_4;
   12557           0 :   int __pyx_lineno = 0;
   12558           0 :   const char *__pyx_filename = NULL;
   12559           0 :   int __pyx_clineno = 0;
   12560             : 
   12561             :   /* "View.MemoryView":701
   12562             :  * 
   12563             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12564             :  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   12565             :  *         if suboffset >= 0:
   12566             :  *             raise ValueError, "Indirect dimensions not supported"
   12567             :  */
   12568           0 :   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
   12569           0 :   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
   12570           0 :     __pyx_t_1 = __pyx_t_3;
   12571           0 :     __pyx_v_suboffset = (__pyx_t_1[0]);
   12572             : 
   12573             :     /* "View.MemoryView":702
   12574             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12575             :  *     for suboffset in suboffsets[:ndim]:
   12576             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12577             :  *             raise ValueError, "Indirect dimensions not supported"
   12578             :  *     return 0  # return type just used as an error flag
   12579             :  */
   12580           0 :     __pyx_t_4 = (__pyx_v_suboffset >= 0);
   12581           0 :     if (unlikely(__pyx_t_4)) {
   12582             : 
   12583             :       /* "View.MemoryView":703
   12584             :  *     for suboffset in suboffsets[:ndim]:
   12585             :  *         if suboffset >= 0:
   12586             :  *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
   12587             :  *     return 0  # return type just used as an error flag
   12588             :  * 
   12589             :  */
   12590           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
   12591           0 :       __PYX_ERR(1, 703, __pyx_L1_error)
   12592             : 
   12593             :       /* "View.MemoryView":702
   12594             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12595             :  *     for suboffset in suboffsets[:ndim]:
   12596             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12597             :  *             raise ValueError, "Indirect dimensions not supported"
   12598             :  *     return 0  # return type just used as an error flag
   12599             :  */
   12600             :     }
   12601             :   }
   12602             : 
   12603             :   /* "View.MemoryView":704
   12604             :  *         if suboffset >= 0:
   12605             :  *             raise ValueError, "Indirect dimensions not supported"
   12606             :  *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
   12607             :  * 
   12608             :  * 
   12609             :  */
   12610           0 :   __pyx_r = 0;
   12611           0 :   goto __pyx_L0;
   12612             : 
   12613             :   /* "View.MemoryView":700
   12614             :  *     return have_slices or nslices, tuple(result)
   12615             :  * 
   12616             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12617             :  *     for suboffset in suboffsets[:ndim]:
   12618             :  *         if suboffset >= 0:
   12619             :  */
   12620             : 
   12621             :   /* function exit code */
   12622           0 :   __pyx_L1_error:;
   12623           0 :   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12624           0 :   __pyx_r = -1;
   12625           0 :   __pyx_L0:;
   12626           0 :   return __pyx_r;
   12627             : }
   12628             : 
   12629             : /* "View.MemoryView":711
   12630             :  * 
   12631             :  * @cname('__pyx_memview_slice')
   12632             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   12633             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   12634             :  *     cdef bint negative_step
   12635             :  */
   12636             : 
   12637           0 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
   12638           0 :   int __pyx_v_new_ndim;
   12639           0 :   int __pyx_v_suboffset_dim;
   12640           0 :   int __pyx_v_dim;
   12641           0 :   __Pyx_memviewslice __pyx_v_src;
   12642           0 :   __Pyx_memviewslice __pyx_v_dst;
   12643           0 :   __Pyx_memviewslice *__pyx_v_p_src;
   12644           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
   12645           0 :   __Pyx_memviewslice *__pyx_v_p_dst;
   12646           0 :   int *__pyx_v_p_suboffset_dim;
   12647           0 :   Py_ssize_t __pyx_v_start;
   12648           0 :   Py_ssize_t __pyx_v_stop;
   12649           0 :   Py_ssize_t __pyx_v_step;
   12650           0 :   Py_ssize_t __pyx_v_cindex;
   12651           0 :   int __pyx_v_have_start;
   12652           0 :   int __pyx_v_have_stop;
   12653           0 :   int __pyx_v_have_step;
   12654           0 :   PyObject *__pyx_v_index = NULL;
   12655           0 :   struct __pyx_memoryview_obj *__pyx_r = NULL;
   12656             :   __Pyx_RefNannyDeclarations
   12657           0 :   int __pyx_t_1;
   12658           0 :   PyObject *__pyx_t_2 = NULL;
   12659           0 :   struct __pyx_memoryview_obj *__pyx_t_3;
   12660           0 :   char *__pyx_t_4;
   12661           0 :   int __pyx_t_5;
   12662           0 :   Py_ssize_t __pyx_t_6;
   12663           0 :   PyObject *(*__pyx_t_7)(PyObject *);
   12664           0 :   PyObject *__pyx_t_8 = NULL;
   12665           0 :   Py_ssize_t __pyx_t_9;
   12666           0 :   int __pyx_t_10;
   12667           0 :   Py_ssize_t __pyx_t_11;
   12668           0 :   int __pyx_lineno = 0;
   12669           0 :   const char *__pyx_filename = NULL;
   12670           0 :   int __pyx_clineno = 0;
   12671           0 :   __Pyx_RefNannySetupContext("memview_slice", 1);
   12672             : 
   12673             :   /* "View.MemoryView":712
   12674             :  * @cname('__pyx_memview_slice')
   12675             :  * cdef memoryview memview_slice(memoryview memview, object indices):
   12676             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
   12677             :  *     cdef bint negative_step
   12678             :  *     cdef __Pyx_memviewslice src, dst
   12679             :  */
   12680           0 :   __pyx_v_new_ndim = 0;
   12681           0 :   __pyx_v_suboffset_dim = -1;
   12682             : 
   12683             :   /* "View.MemoryView":719
   12684             :  * 
   12685             :  * 
   12686             :  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
   12687             :  * 
   12688             :  *     cdef _memoryviewslice memviewsliceobj
   12689             :  */
   12690           0 :   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
   12691             : 
   12692             :   /* "View.MemoryView":723
   12693             :  *     cdef _memoryviewslice memviewsliceobj
   12694             :  * 
   12695             :  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
   12696             :  * 
   12697             :  *     if isinstance(memview, _memoryviewslice):
   12698             :  */
   12699             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
   12700           0 :   if (unlikely(__pyx_assertions_enabled())) {
   12701           0 :     __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
   12702           0 :     if (unlikely(!__pyx_t_1)) {
   12703           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
   12704           0 :       __PYX_ERR(1, 723, __pyx_L1_error)
   12705             :     }
   12706             :   }
   12707             :   #else
   12708             :   if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
   12709             :   #endif
   12710             : 
   12711             :   /* "View.MemoryView":725
   12712             :  *     assert memview.view.ndim > 0
   12713             :  * 
   12714             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12715             :  *         memviewsliceobj = memview
   12716             :  *         p_src = &memviewsliceobj.from_slice
   12717             :  */
   12718           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   12719           0 :   if (__pyx_t_1) {
   12720             : 
   12721             :     /* "View.MemoryView":726
   12722             :  * 
   12723             :  *     if isinstance(memview, _memoryviewslice):
   12724             :  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
   12725             :  *         p_src = &memviewsliceobj.from_slice
   12726             :  *     else:
   12727             :  */
   12728           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
   12729           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   12730           0 :     __Pyx_INCREF(__pyx_t_2);
   12731           0 :     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   12732           0 :     __pyx_t_2 = 0;
   12733             : 
   12734             :     /* "View.MemoryView":727
   12735             :  *     if isinstance(memview, _memoryviewslice):
   12736             :  *         memviewsliceobj = memview
   12737             :  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
   12738             :  *     else:
   12739             :  *         slice_copy(memview, &src)
   12740             :  */
   12741           0 :     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
   12742             : 
   12743             :     /* "View.MemoryView":725
   12744             :  *     assert memview.view.ndim > 0
   12745             :  * 
   12746             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12747             :  *         memviewsliceobj = memview
   12748             :  *         p_src = &memviewsliceobj.from_slice
   12749             :  */
   12750           0 :     goto __pyx_L3;
   12751             :   }
   12752             : 
   12753             :   /* "View.MemoryView":729
   12754             :  *         p_src = &memviewsliceobj.from_slice
   12755             :  *     else:
   12756             :  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
   12757             :  *         p_src = &src
   12758             :  * 
   12759             :  */
   12760             :   /*else*/ {
   12761           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
   12762             : 
   12763             :     /* "View.MemoryView":730
   12764             :  *     else:
   12765             :  *         slice_copy(memview, &src)
   12766             :  *         p_src = &src             # <<<<<<<<<<<<<<
   12767             :  * 
   12768             :  * 
   12769             :  */
   12770           0 :     __pyx_v_p_src = (&__pyx_v_src);
   12771             :   }
   12772           0 :   __pyx_L3:;
   12773             : 
   12774             :   /* "View.MemoryView":736
   12775             :  * 
   12776             :  * 
   12777             :  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
   12778             :  *     dst.data = p_src.data
   12779             :  * 
   12780             :  */
   12781           0 :   __pyx_t_3 = __pyx_v_p_src->memview;
   12782           0 :   __pyx_v_dst.memview = __pyx_t_3;
   12783             : 
   12784             :   /* "View.MemoryView":737
   12785             :  * 
   12786             :  *     dst.memview = p_src.memview
   12787             :  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
   12788             :  * 
   12789             :  * 
   12790             :  */
   12791           0 :   __pyx_t_4 = __pyx_v_p_src->data;
   12792           0 :   __pyx_v_dst.data = __pyx_t_4;
   12793             : 
   12794             :   /* "View.MemoryView":742
   12795             :  * 
   12796             :  * 
   12797             :  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
   12798             :  *     cdef int *p_suboffset_dim = &suboffset_dim
   12799             :  *     cdef Py_ssize_t start, stop, step, cindex
   12800             :  */
   12801           0 :   __pyx_v_p_dst = (&__pyx_v_dst);
   12802             : 
   12803             :   /* "View.MemoryView":743
   12804             :  * 
   12805             :  *     cdef __Pyx_memviewslice *p_dst = &dst
   12806             :  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
   12807             :  *     cdef Py_ssize_t start, stop, step, cindex
   12808             :  *     cdef bint have_start, have_stop, have_step
   12809             :  */
   12810           0 :   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
   12811             : 
   12812             :   /* "View.MemoryView":747
   12813             :  *     cdef bint have_start, have_stop, have_step
   12814             :  * 
   12815             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   12816             :  *         if PyIndex_Check(index):
   12817             :  *             cindex = index
   12818             :  */
   12819           0 :   __pyx_t_5 = 0;
   12820           0 :   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
   12821           0 :     __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
   12822           0 :     __pyx_t_6 = 0;
   12823           0 :     __pyx_t_7 = NULL;
   12824             :   } else {
   12825           0 :     __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
   12826           0 :     __Pyx_GOTREF(__pyx_t_2);
   12827           0 :     __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
   12828             :   }
   12829           0 :   for (;;) {
   12830           0 :     if (likely(!__pyx_t_7)) {
   12831           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
   12832             :         {
   12833           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
   12834             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12835             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12836             :           #endif
   12837           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12838             :         }
   12839             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12840           0 :         __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12841             :         #else
   12842             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12843             :         __Pyx_GOTREF(__pyx_t_8);
   12844             :         #endif
   12845             :       } else {
   12846             :         {
   12847           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
   12848             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12849             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12850             :           #endif
   12851           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12852             :         }
   12853             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12854           0 :         __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12855             :         #else
   12856             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12857             :         __Pyx_GOTREF(__pyx_t_8);
   12858             :         #endif
   12859             :       }
   12860             :     } else {
   12861           0 :       __pyx_t_8 = __pyx_t_7(__pyx_t_2);
   12862           0 :       if (unlikely(!__pyx_t_8)) {
   12863           0 :         PyObject* exc_type = PyErr_Occurred();
   12864           0 :         if (exc_type) {
   12865           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
   12866           0 :           else __PYX_ERR(1, 747, __pyx_L1_error)
   12867             :         }
   12868             :         break;
   12869             :       }
   12870           0 :       __Pyx_GOTREF(__pyx_t_8);
   12871             :     }
   12872           0 :     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
   12873           0 :     __pyx_t_8 = 0;
   12874           0 :     __pyx_v_dim = __pyx_t_5;
   12875           0 :     __pyx_t_5 = (__pyx_t_5 + 1);
   12876             : 
   12877             :     /* "View.MemoryView":748
   12878             :  * 
   12879             :  *     for dim, index in enumerate(indices):
   12880             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12881             :  *             cindex = index
   12882             :  *             slice_memviewslice(
   12883             :  */
   12884           0 :     __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
   12885           0 :     if (__pyx_t_1) {
   12886             : 
   12887             :       /* "View.MemoryView":749
   12888             :  *     for dim, index in enumerate(indices):
   12889             :  *         if PyIndex_Check(index):
   12890             :  *             cindex = index             # <<<<<<<<<<<<<<
   12891             :  *             slice_memviewslice(
   12892             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12893             :  */
   12894           0 :       __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
   12895           0 :       __pyx_v_cindex = __pyx_t_9;
   12896             : 
   12897             :       /* "View.MemoryView":750
   12898             :  *         if PyIndex_Check(index):
   12899             :  *             cindex = index
   12900             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   12901             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12902             :  *                 dim, new_ndim, p_suboffset_dim,
   12903             :  */
   12904           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
   12905             : 
   12906             :       /* "View.MemoryView":748
   12907             :  * 
   12908             :  *     for dim, index in enumerate(indices):
   12909             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12910             :  *             cindex = index
   12911             :  *             slice_memviewslice(
   12912             :  */
   12913           0 :       goto __pyx_L6;
   12914             :     }
   12915             : 
   12916             :     /* "View.MemoryView":756
   12917             :  *                 0, 0, 0, # have_{start,stop,step}
   12918             :  *                 False)
   12919             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12920             :  *             p_dst.shape[new_ndim] = 1
   12921             :  *             p_dst.strides[new_ndim] = 0
   12922             :  */
   12923           0 :     __pyx_t_1 = (__pyx_v_index == Py_None);
   12924           0 :     if (__pyx_t_1) {
   12925             : 
   12926             :       /* "View.MemoryView":757
   12927             :  *                 False)
   12928             :  *         elif index is None:
   12929             :  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
   12930             :  *             p_dst.strides[new_ndim] = 0
   12931             :  *             p_dst.suboffsets[new_ndim] = -1
   12932             :  */
   12933           0 :       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
   12934             : 
   12935             :       /* "View.MemoryView":758
   12936             :  *         elif index is None:
   12937             :  *             p_dst.shape[new_ndim] = 1
   12938             :  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
   12939             :  *             p_dst.suboffsets[new_ndim] = -1
   12940             :  *             new_ndim += 1
   12941             :  */
   12942           0 :       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
   12943             : 
   12944             :       /* "View.MemoryView":759
   12945             :  *             p_dst.shape[new_ndim] = 1
   12946             :  *             p_dst.strides[new_ndim] = 0
   12947             :  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
   12948             :  *             new_ndim += 1
   12949             :  *         else:
   12950             :  */
   12951           0 :       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
   12952             : 
   12953             :       /* "View.MemoryView":760
   12954             :  *             p_dst.strides[new_ndim] = 0
   12955             :  *             p_dst.suboffsets[new_ndim] = -1
   12956             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   12957             :  *         else:
   12958             :  *             start = index.start or 0
   12959             :  */
   12960           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   12961             : 
   12962             :       /* "View.MemoryView":756
   12963             :  *                 0, 0, 0, # have_{start,stop,step}
   12964             :  *                 False)
   12965             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12966             :  *             p_dst.shape[new_ndim] = 1
   12967             :  *             p_dst.strides[new_ndim] = 0
   12968             :  */
   12969           0 :       goto __pyx_L6;
   12970             :     }
   12971             : 
   12972             :     /* "View.MemoryView":762
   12973             :  *             new_ndim += 1
   12974             :  *         else:
   12975             :  *             start = index.start or 0             # <<<<<<<<<<<<<<
   12976             :  *             stop = index.stop or 0
   12977             :  *             step = index.step or 0
   12978             :  */
   12979             :     /*else*/ {
   12980           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
   12981           0 :       __Pyx_GOTREF(__pyx_t_8);
   12982           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
   12983           0 :       if (!__pyx_t_1) {
   12984           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12985             :       } else {
   12986           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
   12987           0 :         __pyx_t_9 = __pyx_t_11;
   12988           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12989           0 :         goto __pyx_L7_bool_binop_done;
   12990             :       }
   12991             :       __pyx_t_9 = 0;
   12992           0 :       __pyx_L7_bool_binop_done:;
   12993           0 :       __pyx_v_start = __pyx_t_9;
   12994             : 
   12995             :       /* "View.MemoryView":763
   12996             :  *         else:
   12997             :  *             start = index.start or 0
   12998             :  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
   12999             :  *             step = index.step or 0
   13000             :  * 
   13001             :  */
   13002           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
   13003           0 :       __Pyx_GOTREF(__pyx_t_8);
   13004           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
   13005           0 :       if (!__pyx_t_1) {
   13006           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13007             :       } else {
   13008           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
   13009           0 :         __pyx_t_9 = __pyx_t_11;
   13010           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13011           0 :         goto __pyx_L9_bool_binop_done;
   13012             :       }
   13013             :       __pyx_t_9 = 0;
   13014           0 :       __pyx_L9_bool_binop_done:;
   13015           0 :       __pyx_v_stop = __pyx_t_9;
   13016             : 
   13017             :       /* "View.MemoryView":764
   13018             :  *             start = index.start or 0
   13019             :  *             stop = index.stop or 0
   13020             :  *             step = index.step or 0             # <<<<<<<<<<<<<<
   13021             :  * 
   13022             :  *             have_start = index.start is not None
   13023             :  */
   13024           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
   13025           0 :       __Pyx_GOTREF(__pyx_t_8);
   13026           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
   13027           0 :       if (!__pyx_t_1) {
   13028           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13029             :       } else {
   13030           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
   13031           0 :         __pyx_t_9 = __pyx_t_11;
   13032           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13033           0 :         goto __pyx_L11_bool_binop_done;
   13034             :       }
   13035             :       __pyx_t_9 = 0;
   13036           0 :       __pyx_L11_bool_binop_done:;
   13037           0 :       __pyx_v_step = __pyx_t_9;
   13038             : 
   13039             :       /* "View.MemoryView":766
   13040             :  *             step = index.step or 0
   13041             :  * 
   13042             :  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
   13043             :  *             have_stop = index.stop is not None
   13044             :  *             have_step = index.step is not None
   13045             :  */
   13046           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
   13047           0 :       __Pyx_GOTREF(__pyx_t_8);
   13048           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13049           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13050           0 :       __pyx_v_have_start = __pyx_t_1;
   13051             : 
   13052             :       /* "View.MemoryView":767
   13053             :  * 
   13054             :  *             have_start = index.start is not None
   13055             :  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
   13056             :  *             have_step = index.step is not None
   13057             :  * 
   13058             :  */
   13059           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
   13060           0 :       __Pyx_GOTREF(__pyx_t_8);
   13061           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13062           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13063           0 :       __pyx_v_have_stop = __pyx_t_1;
   13064             : 
   13065             :       /* "View.MemoryView":768
   13066             :  *             have_start = index.start is not None
   13067             :  *             have_stop = index.stop is not None
   13068             :  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
   13069             :  * 
   13070             :  *             slice_memviewslice(
   13071             :  */
   13072           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
   13073           0 :       __Pyx_GOTREF(__pyx_t_8);
   13074           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13075           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13076           0 :       __pyx_v_have_step = __pyx_t_1;
   13077             : 
   13078             :       /* "View.MemoryView":770
   13079             :  *             have_step = index.step is not None
   13080             :  * 
   13081             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   13082             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   13083             :  *                 dim, new_ndim, p_suboffset_dim,
   13084             :  */
   13085           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
   13086             : 
   13087             :       /* "View.MemoryView":776
   13088             :  *                 have_start, have_stop, have_step,
   13089             :  *                 True)
   13090             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   13091             :  * 
   13092             :  *     if isinstance(memview, _memoryviewslice):
   13093             :  */
   13094           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   13095             :     }
   13096           0 :     __pyx_L6:;
   13097             : 
   13098             :     /* "View.MemoryView":747
   13099             :  *     cdef bint have_start, have_stop, have_step
   13100             :  * 
   13101             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   13102             :  *         if PyIndex_Check(index):
   13103             :  *             cindex = index
   13104             :  */
   13105             :   }
   13106           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   13107             : 
   13108             :   /* "View.MemoryView":778
   13109             :  *             new_ndim += 1
   13110             :  * 
   13111             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13112             :  *         return memoryview_fromslice(dst, new_ndim,
   13113             :  *                                     memviewsliceobj.to_object_func,
   13114             :  */
   13115           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   13116           0 :   if (__pyx_t_1) {
   13117             : 
   13118             :     /* "View.MemoryView":779
   13119             :  * 
   13120             :  *     if isinstance(memview, _memoryviewslice):
   13121             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   13122             :  *                                     memviewsliceobj.to_object_func,
   13123             :  *                                     memviewsliceobj.to_dtype_func,
   13124             :  */
   13125           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   13126             : 
   13127             :     /* "View.MemoryView":780
   13128             :  *     if isinstance(memview, _memoryviewslice):
   13129             :  *         return memoryview_fromslice(dst, new_ndim,
   13130             :  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
   13131             :  *                                     memviewsliceobj.to_dtype_func,
   13132             :  *                                     memview.dtype_is_object)
   13133             :  */
   13134           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
   13135             : 
   13136             :     /* "View.MemoryView":781
   13137             :  *         return memoryview_fromslice(dst, new_ndim,
   13138             :  *                                     memviewsliceobj.to_object_func,
   13139             :  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
   13140             :  *                                     memview.dtype_is_object)
   13141             :  *     else:
   13142             :  */
   13143           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
   13144             : 
   13145             :     /* "View.MemoryView":779
   13146             :  * 
   13147             :  *     if isinstance(memview, _memoryviewslice):
   13148             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   13149             :  *                                     memviewsliceobj.to_object_func,
   13150             :  *                                     memviewsliceobj.to_dtype_func,
   13151             :  */
   13152           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
   13153           0 :     __Pyx_GOTREF(__pyx_t_2);
   13154           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
   13155           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   13156           0 :     __pyx_t_2 = 0;
   13157           0 :     goto __pyx_L0;
   13158             : 
   13159             :     /* "View.MemoryView":778
   13160             :  *             new_ndim += 1
   13161             :  * 
   13162             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13163             :  *         return memoryview_fromslice(dst, new_ndim,
   13164             :  *                                     memviewsliceobj.to_object_func,
   13165             :  */
   13166             :   }
   13167             : 
   13168             :   /* "View.MemoryView":784
   13169             :  *                                     memview.dtype_is_object)
   13170             :  *     else:
   13171             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   13172             :  *                                     memview.dtype_is_object)
   13173             :  * 
   13174             :  */
   13175             :   /*else*/ {
   13176           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   13177             : 
   13178             :     /* "View.MemoryView":785
   13179             :  *     else:
   13180             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
   13181             :  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
   13182             :  * 
   13183             :  * 
   13184             :  */
   13185           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
   13186           0 :     __Pyx_GOTREF(__pyx_t_2);
   13187             : 
   13188             :     /* "View.MemoryView":784
   13189             :  *                                     memview.dtype_is_object)
   13190             :  *     else:
   13191             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   13192             :  *                                     memview.dtype_is_object)
   13193             :  * 
   13194             :  */
   13195           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
   13196           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   13197           0 :     __pyx_t_2 = 0;
   13198           0 :     goto __pyx_L0;
   13199             :   }
   13200             : 
   13201             :   /* "View.MemoryView":711
   13202             :  * 
   13203             :  * @cname('__pyx_memview_slice')
   13204             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   13205             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   13206             :  *     cdef bint negative_step
   13207             :  */
   13208             : 
   13209             :   /* function exit code */
   13210           0 :   __pyx_L1_error:;
   13211           0 :   __Pyx_XDECREF(__pyx_t_2);
   13212           0 :   __Pyx_XDECREF(__pyx_t_8);
   13213           0 :   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13214           0 :   __pyx_r = 0;
   13215           0 :   __pyx_L0:;
   13216           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
   13217           0 :   __Pyx_XDECREF(__pyx_v_index);
   13218           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   13219           0 :   __Pyx_RefNannyFinishContext();
   13220           0 :   return __pyx_r;
   13221             : }
   13222             : 
   13223             : /* "View.MemoryView":793
   13224             :  * 
   13225             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13226             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13227             :  *         __Pyx_memviewslice *dst,
   13228             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13229             :  */
   13230             : 
   13231           0 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
   13232           0 :   Py_ssize_t __pyx_v_new_shape;
   13233           0 :   int __pyx_v_negative_step;
   13234           0 :   int __pyx_r;
   13235           0 :   int __pyx_t_1;
   13236           0 :   int __pyx_t_2;
   13237           0 :   int __pyx_t_3;
   13238           0 :   int __pyx_lineno = 0;
   13239           0 :   const char *__pyx_filename = NULL;
   13240           0 :   int __pyx_clineno = 0;
   13241             :   #ifdef WITH_THREAD
   13242           0 :   PyGILState_STATE __pyx_gilstate_save;
   13243             :   #endif
   13244             : 
   13245             :   /* "View.MemoryView":813
   13246             :  *     cdef bint negative_step
   13247             :  * 
   13248             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13249             :  * 
   13250             :  *         if start < 0:
   13251             :  */
   13252           0 :   __pyx_t_1 = (!__pyx_v_is_slice);
   13253           0 :   if (__pyx_t_1) {
   13254             : 
   13255             :     /* "View.MemoryView":815
   13256             :  *     if not is_slice:
   13257             :  * 
   13258             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13259             :  *             start += shape
   13260             :  *         if not 0 <= start < shape:
   13261             :  */
   13262           0 :     __pyx_t_1 = (__pyx_v_start < 0);
   13263           0 :     if (__pyx_t_1) {
   13264             : 
   13265             :       /* "View.MemoryView":816
   13266             :  * 
   13267             :  *         if start < 0:
   13268             :  *             start += shape             # <<<<<<<<<<<<<<
   13269             :  *         if not 0 <= start < shape:
   13270             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13271             :  */
   13272           0 :       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13273             : 
   13274             :       /* "View.MemoryView":815
   13275             :  *     if not is_slice:
   13276             :  * 
   13277             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13278             :  *             start += shape
   13279             :  *         if not 0 <= start < shape:
   13280             :  */
   13281             :     }
   13282             : 
   13283             :     /* "View.MemoryView":817
   13284             :  *         if start < 0:
   13285             :  *             start += shape
   13286             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13287             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13288             :  *     else:
   13289             :  */
   13290           0 :     __pyx_t_1 = (0 <= __pyx_v_start);
   13291           0 :     if (__pyx_t_1) {
   13292           0 :       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
   13293             :     }
   13294           0 :     __pyx_t_2 = (!__pyx_t_1);
   13295           0 :     if (__pyx_t_2) {
   13296             : 
   13297             :       /* "View.MemoryView":818
   13298             :  *             start += shape
   13299             :  *         if not 0 <= start < shape:
   13300             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
   13301             :  *     else:
   13302             :  * 
   13303             :  */
   13304           0 :       __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)
   13305             : 
   13306             :       /* "View.MemoryView":817
   13307             :  *         if start < 0:
   13308             :  *             start += shape
   13309             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13310             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13311             :  *     else:
   13312             :  */
   13313             :     }
   13314             : 
   13315             :     /* "View.MemoryView":813
   13316             :  *     cdef bint negative_step
   13317             :  * 
   13318             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13319             :  * 
   13320             :  *         if start < 0:
   13321             :  */
   13322           0 :     goto __pyx_L3;
   13323             :   }
   13324             : 
   13325             :   /* "View.MemoryView":821
   13326             :  *     else:
   13327             :  * 
   13328             :  *         if have_step:             # <<<<<<<<<<<<<<
   13329             :  *             negative_step = step < 0
   13330             :  *             if step == 0:
   13331             :  */
   13332             :   /*else*/ {
   13333           0 :     __pyx_t_2 = (__pyx_v_have_step != 0);
   13334           0 :     if (__pyx_t_2) {
   13335             : 
   13336             :       /* "View.MemoryView":822
   13337             :  * 
   13338             :  *         if have_step:
   13339             :  *             negative_step = step < 0             # <<<<<<<<<<<<<<
   13340             :  *             if step == 0:
   13341             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13342             :  */
   13343           0 :       __pyx_v_negative_step = (__pyx_v_step < 0);
   13344             : 
   13345             :       /* "View.MemoryView":823
   13346             :  *         if have_step:
   13347             :  *             negative_step = step < 0
   13348             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13349             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13350             :  *         else:
   13351             :  */
   13352           0 :       __pyx_t_2 = (__pyx_v_step == 0);
   13353           0 :       if (__pyx_t_2) {
   13354             : 
   13355             :         /* "View.MemoryView":824
   13356             :  *             negative_step = step < 0
   13357             :  *             if step == 0:
   13358             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
   13359             :  *         else:
   13360             :  *             negative_step = False
   13361             :  */
   13362           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)
   13363             : 
   13364             :         /* "View.MemoryView":823
   13365             :  *         if have_step:
   13366             :  *             negative_step = step < 0
   13367             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13368             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13369             :  *         else:
   13370             :  */
   13371             :       }
   13372             : 
   13373             :       /* "View.MemoryView":821
   13374             :  *     else:
   13375             :  * 
   13376             :  *         if have_step:             # <<<<<<<<<<<<<<
   13377             :  *             negative_step = step < 0
   13378             :  *             if step == 0:
   13379             :  */
   13380           0 :       goto __pyx_L6;
   13381             :     }
   13382             : 
   13383             :     /* "View.MemoryView":826
   13384             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13385             :  *         else:
   13386             :  *             negative_step = False             # <<<<<<<<<<<<<<
   13387             :  *             step = 1
   13388             :  * 
   13389             :  */
   13390             :     /*else*/ {
   13391             :       __pyx_v_negative_step = 0;
   13392             : 
   13393             :       /* "View.MemoryView":827
   13394             :  *         else:
   13395             :  *             negative_step = False
   13396             :  *             step = 1             # <<<<<<<<<<<<<<
   13397             :  * 
   13398             :  * 
   13399             :  */
   13400             :       __pyx_v_step = 1;
   13401             :     }
   13402           0 :     __pyx_L6:;
   13403             : 
   13404             :     /* "View.MemoryView":830
   13405             :  * 
   13406             :  * 
   13407             :  *         if have_start:             # <<<<<<<<<<<<<<
   13408             :  *             if start < 0:
   13409             :  *                 start += shape
   13410             :  */
   13411           0 :     __pyx_t_2 = (__pyx_v_have_start != 0);
   13412           0 :     if (__pyx_t_2) {
   13413             : 
   13414             :       /* "View.MemoryView":831
   13415             :  * 
   13416             :  *         if have_start:
   13417             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13418             :  *                 start += shape
   13419             :  *                 if start < 0:
   13420             :  */
   13421           0 :       __pyx_t_2 = (__pyx_v_start < 0);
   13422           0 :       if (__pyx_t_2) {
   13423             : 
   13424             :         /* "View.MemoryView":832
   13425             :  *         if have_start:
   13426             :  *             if start < 0:
   13427             :  *                 start += shape             # <<<<<<<<<<<<<<
   13428             :  *                 if start < 0:
   13429             :  *                     start = 0
   13430             :  */
   13431           0 :         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13432             : 
   13433             :         /* "View.MemoryView":833
   13434             :  *             if start < 0:
   13435             :  *                 start += shape
   13436             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13437             :  *                     start = 0
   13438             :  *             elif start >= shape:
   13439             :  */
   13440           0 :         __pyx_t_2 = (__pyx_v_start < 0);
   13441           0 :         if (__pyx_t_2) {
   13442             : 
   13443             :           /* "View.MemoryView":834
   13444             :  *                 start += shape
   13445             :  *                 if start < 0:
   13446             :  *                     start = 0             # <<<<<<<<<<<<<<
   13447             :  *             elif start >= shape:
   13448             :  *                 if negative_step:
   13449             :  */
   13450             :           __pyx_v_start = 0;
   13451             : 
   13452             :           /* "View.MemoryView":833
   13453             :  *             if start < 0:
   13454             :  *                 start += shape
   13455             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13456             :  *                     start = 0
   13457             :  *             elif start >= shape:
   13458             :  */
   13459             :         }
   13460             : 
   13461             :         /* "View.MemoryView":831
   13462             :  * 
   13463             :  *         if have_start:
   13464             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13465             :  *                 start += shape
   13466             :  *                 if start < 0:
   13467             :  */
   13468           0 :         goto __pyx_L9;
   13469             :       }
   13470             : 
   13471             :       /* "View.MemoryView":835
   13472             :  *                 if start < 0:
   13473             :  *                     start = 0
   13474             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13475             :  *                 if negative_step:
   13476             :  *                     start = shape - 1
   13477             :  */
   13478           0 :       __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
   13479           0 :       if (__pyx_t_2) {
   13480             : 
   13481             :         /* "View.MemoryView":836
   13482             :  *                     start = 0
   13483             :  *             elif start >= shape:
   13484             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13485             :  *                     start = shape - 1
   13486             :  *                 else:
   13487             :  */
   13488           0 :         if (__pyx_v_negative_step) {
   13489             : 
   13490             :           /* "View.MemoryView":837
   13491             :  *             elif start >= shape:
   13492             :  *                 if negative_step:
   13493             :  *                     start = shape - 1             # <<<<<<<<<<<<<<
   13494             :  *                 else:
   13495             :  *                     start = shape
   13496             :  */
   13497           0 :           __pyx_v_start = (__pyx_v_shape - 1);
   13498             : 
   13499             :           /* "View.MemoryView":836
   13500             :  *                     start = 0
   13501             :  *             elif start >= shape:
   13502             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13503             :  *                     start = shape - 1
   13504             :  *                 else:
   13505             :  */
   13506           0 :           goto __pyx_L11;
   13507             :         }
   13508             : 
   13509             :         /* "View.MemoryView":839
   13510             :  *                     start = shape - 1
   13511             :  *                 else:
   13512             :  *                     start = shape             # <<<<<<<<<<<<<<
   13513             :  *         else:
   13514             :  *             if negative_step:
   13515             :  */
   13516             :         /*else*/ {
   13517             :           __pyx_v_start = __pyx_v_shape;
   13518             :         }
   13519           0 :         __pyx_L11:;
   13520             : 
   13521             :         /* "View.MemoryView":835
   13522             :  *                 if start < 0:
   13523             :  *                     start = 0
   13524             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13525             :  *                 if negative_step:
   13526             :  *                     start = shape - 1
   13527             :  */
   13528             :       }
   13529           0 :       __pyx_L9:;
   13530             : 
   13531             :       /* "View.MemoryView":830
   13532             :  * 
   13533             :  * 
   13534             :  *         if have_start:             # <<<<<<<<<<<<<<
   13535             :  *             if start < 0:
   13536             :  *                 start += shape
   13537             :  */
   13538           0 :       goto __pyx_L8;
   13539             :     }
   13540             : 
   13541             :     /* "View.MemoryView":841
   13542             :  *                     start = shape
   13543             :  *         else:
   13544             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13545             :  *                 start = shape - 1
   13546             :  *             else:
   13547             :  */
   13548             :     /*else*/ {
   13549           0 :       if (__pyx_v_negative_step) {
   13550             : 
   13551             :         /* "View.MemoryView":842
   13552             :  *         else:
   13553             :  *             if negative_step:
   13554             :  *                 start = shape - 1             # <<<<<<<<<<<<<<
   13555             :  *             else:
   13556             :  *                 start = 0
   13557             :  */
   13558           0 :         __pyx_v_start = (__pyx_v_shape - 1);
   13559             : 
   13560             :         /* "View.MemoryView":841
   13561             :  *                     start = shape
   13562             :  *         else:
   13563             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13564             :  *                 start = shape - 1
   13565             :  *             else:
   13566             :  */
   13567           0 :         goto __pyx_L12;
   13568             :       }
   13569             : 
   13570             :       /* "View.MemoryView":844
   13571             :  *                 start = shape - 1
   13572             :  *             else:
   13573             :  *                 start = 0             # <<<<<<<<<<<<<<
   13574             :  * 
   13575             :  *         if have_stop:
   13576             :  */
   13577             :       /*else*/ {
   13578             :         __pyx_v_start = 0;
   13579             :       }
   13580           0 :       __pyx_L12:;
   13581             :     }
   13582           0 :     __pyx_L8:;
   13583             : 
   13584             :     /* "View.MemoryView":846
   13585             :  *                 start = 0
   13586             :  * 
   13587             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13588             :  *             if stop < 0:
   13589             :  *                 stop += shape
   13590             :  */
   13591           0 :     __pyx_t_2 = (__pyx_v_have_stop != 0);
   13592           0 :     if (__pyx_t_2) {
   13593             : 
   13594             :       /* "View.MemoryView":847
   13595             :  * 
   13596             :  *         if have_stop:
   13597             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13598             :  *                 stop += shape
   13599             :  *                 if stop < 0:
   13600             :  */
   13601           0 :       __pyx_t_2 = (__pyx_v_stop < 0);
   13602           0 :       if (__pyx_t_2) {
   13603             : 
   13604             :         /* "View.MemoryView":848
   13605             :  *         if have_stop:
   13606             :  *             if stop < 0:
   13607             :  *                 stop += shape             # <<<<<<<<<<<<<<
   13608             :  *                 if stop < 0:
   13609             :  *                     stop = 0
   13610             :  */
   13611           0 :         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
   13612             : 
   13613             :         /* "View.MemoryView":849
   13614             :  *             if stop < 0:
   13615             :  *                 stop += shape
   13616             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13617             :  *                     stop = 0
   13618             :  *             elif stop > shape:
   13619             :  */
   13620           0 :         __pyx_t_2 = (__pyx_v_stop < 0);
   13621           0 :         if (__pyx_t_2) {
   13622             : 
   13623             :           /* "View.MemoryView":850
   13624             :  *                 stop += shape
   13625             :  *                 if stop < 0:
   13626             :  *                     stop = 0             # <<<<<<<<<<<<<<
   13627             :  *             elif stop > shape:
   13628             :  *                 stop = shape
   13629             :  */
   13630             :           __pyx_v_stop = 0;
   13631             : 
   13632             :           /* "View.MemoryView":849
   13633             :  *             if stop < 0:
   13634             :  *                 stop += shape
   13635             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13636             :  *                     stop = 0
   13637             :  *             elif stop > shape:
   13638             :  */
   13639             :         }
   13640             : 
   13641             :         /* "View.MemoryView":847
   13642             :  * 
   13643             :  *         if have_stop:
   13644             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13645             :  *                 stop += shape
   13646             :  *                 if stop < 0:
   13647             :  */
   13648           0 :         goto __pyx_L14;
   13649             :       }
   13650             : 
   13651             :       /* "View.MemoryView":851
   13652             :  *                 if stop < 0:
   13653             :  *                     stop = 0
   13654             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13655             :  *                 stop = shape
   13656             :  *         else:
   13657             :  */
   13658           0 :       __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
   13659           0 :       if (__pyx_t_2) {
   13660             : 
   13661             :         /* "View.MemoryView":852
   13662             :  *                     stop = 0
   13663             :  *             elif stop > shape:
   13664             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13665             :  *         else:
   13666             :  *             if negative_step:
   13667             :  */
   13668             :         __pyx_v_stop = __pyx_v_shape;
   13669             : 
   13670             :         /* "View.MemoryView":851
   13671             :  *                 if stop < 0:
   13672             :  *                     stop = 0
   13673             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13674             :  *                 stop = shape
   13675             :  *         else:
   13676             :  */
   13677             :       }
   13678           0 :       __pyx_L14:;
   13679             : 
   13680             :       /* "View.MemoryView":846
   13681             :  *                 start = 0
   13682             :  * 
   13683             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13684             :  *             if stop < 0:
   13685             :  *                 stop += shape
   13686             :  */
   13687           0 :       goto __pyx_L13;
   13688             :     }
   13689             : 
   13690             :     /* "View.MemoryView":854
   13691             :  *                 stop = shape
   13692             :  *         else:
   13693             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13694             :  *                 stop = -1
   13695             :  *             else:
   13696             :  */
   13697             :     /*else*/ {
   13698           0 :       if (__pyx_v_negative_step) {
   13699             : 
   13700             :         /* "View.MemoryView":855
   13701             :  *         else:
   13702             :  *             if negative_step:
   13703             :  *                 stop = -1             # <<<<<<<<<<<<<<
   13704             :  *             else:
   13705             :  *                 stop = shape
   13706             :  */
   13707           0 :         __pyx_v_stop = -1L;
   13708             : 
   13709             :         /* "View.MemoryView":854
   13710             :  *                 stop = shape
   13711             :  *         else:
   13712             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13713             :  *                 stop = -1
   13714             :  *             else:
   13715             :  */
   13716           0 :         goto __pyx_L16;
   13717             :       }
   13718             : 
   13719             :       /* "View.MemoryView":857
   13720             :  *                 stop = -1
   13721             :  *             else:
   13722             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13723             :  * 
   13724             :  * 
   13725             :  */
   13726             :       /*else*/ {
   13727             :         __pyx_v_stop = __pyx_v_shape;
   13728             :       }
   13729           0 :       __pyx_L16:;
   13730             :     }
   13731           0 :     __pyx_L13:;
   13732             : 
   13733             :     /* "View.MemoryView":861
   13734             :  * 
   13735             :  *         with cython.cdivision(True):
   13736             :  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
   13737             :  * 
   13738             :  *             if (stop - start) - step * new_shape:
   13739             :  */
   13740           0 :     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
   13741             : 
   13742             :     /* "View.MemoryView":863
   13743             :  *             new_shape = (stop - start) // step
   13744             :  * 
   13745             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13746             :  *                 new_shape += 1
   13747             :  * 
   13748             :  */
   13749           0 :     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
   13750           0 :     if (__pyx_t_2) {
   13751             : 
   13752             :       /* "View.MemoryView":864
   13753             :  * 
   13754             :  *             if (stop - start) - step * new_shape:
   13755             :  *                 new_shape += 1             # <<<<<<<<<<<<<<
   13756             :  * 
   13757             :  *         if new_shape < 0:
   13758             :  */
   13759           0 :       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
   13760             : 
   13761             :       /* "View.MemoryView":863
   13762             :  *             new_shape = (stop - start) // step
   13763             :  * 
   13764             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13765             :  *                 new_shape += 1
   13766             :  * 
   13767             :  */
   13768             :     }
   13769             : 
   13770             :     /* "View.MemoryView":866
   13771             :  *                 new_shape += 1
   13772             :  * 
   13773             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13774             :  *             new_shape = 0
   13775             :  * 
   13776             :  */
   13777           0 :     __pyx_t_2 = (__pyx_v_new_shape < 0);
   13778           0 :     if (__pyx_t_2) {
   13779             : 
   13780             :       /* "View.MemoryView":867
   13781             :  * 
   13782             :  *         if new_shape < 0:
   13783             :  *             new_shape = 0             # <<<<<<<<<<<<<<
   13784             :  * 
   13785             :  * 
   13786             :  */
   13787             :       __pyx_v_new_shape = 0;
   13788             : 
   13789             :       /* "View.MemoryView":866
   13790             :  *                 new_shape += 1
   13791             :  * 
   13792             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13793             :  *             new_shape = 0
   13794             :  * 
   13795             :  */
   13796             :     }
   13797             : 
   13798             :     /* "View.MemoryView":870
   13799             :  * 
   13800             :  * 
   13801             :  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
   13802             :  *         dst.shape[new_ndim] = new_shape
   13803             :  *         dst.suboffsets[new_ndim] = suboffset
   13804             :  */
   13805           0 :     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
   13806             : 
   13807             :     /* "View.MemoryView":871
   13808             :  * 
   13809             :  *         dst.strides[new_ndim] = stride * step
   13810             :  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
   13811             :  *         dst.suboffsets[new_ndim] = suboffset
   13812             :  * 
   13813             :  */
   13814           0 :     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
   13815             : 
   13816             :     /* "View.MemoryView":872
   13817             :  *         dst.strides[new_ndim] = stride * step
   13818             :  *         dst.shape[new_ndim] = new_shape
   13819             :  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
   13820             :  * 
   13821             :  * 
   13822             :  */
   13823           0 :     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
   13824             :   }
   13825           0 :   __pyx_L3:;
   13826             : 
   13827             :   /* "View.MemoryView":875
   13828             :  * 
   13829             :  * 
   13830             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13831             :  *         dst.data += start * stride
   13832             :  *     else:
   13833             :  */
   13834           0 :   __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
   13835           0 :   if (__pyx_t_2) {
   13836             : 
   13837             :     /* "View.MemoryView":876
   13838             :  * 
   13839             :  *     if suboffset_dim[0] < 0:
   13840             :  *         dst.data += start * stride             # <<<<<<<<<<<<<<
   13841             :  *     else:
   13842             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13843             :  */
   13844           0 :     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
   13845             : 
   13846             :     /* "View.MemoryView":875
   13847             :  * 
   13848             :  * 
   13849             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13850             :  *         dst.data += start * stride
   13851             :  *     else:
   13852             :  */
   13853           0 :     goto __pyx_L19;
   13854             :   }
   13855             : 
   13856             :   /* "View.MemoryView":878
   13857             :  *         dst.data += start * stride
   13858             :  *     else:
   13859             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
   13860             :  * 
   13861             :  *     if suboffset >= 0:
   13862             :  */
   13863             :   /*else*/ {
   13864           0 :     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
   13865           0 :     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
   13866             :   }
   13867           0 :   __pyx_L19:;
   13868             : 
   13869             :   /* "View.MemoryView":880
   13870             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13871             :  * 
   13872             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13873             :  *         if not is_slice:
   13874             :  *             if new_ndim == 0:
   13875             :  */
   13876           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   13877           0 :   if (__pyx_t_2) {
   13878             : 
   13879             :     /* "View.MemoryView":881
   13880             :  * 
   13881             :  *     if suboffset >= 0:
   13882             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13883             :  *             if new_ndim == 0:
   13884             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13885             :  */
   13886           0 :     __pyx_t_2 = (!__pyx_v_is_slice);
   13887           0 :     if (__pyx_t_2) {
   13888             : 
   13889             :       /* "View.MemoryView":882
   13890             :  *     if suboffset >= 0:
   13891             :  *         if not is_slice:
   13892             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13893             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13894             :  *             else:
   13895             :  */
   13896           0 :       __pyx_t_2 = (__pyx_v_new_ndim == 0);
   13897           0 :       if (__pyx_t_2) {
   13898             : 
   13899             :         /* "View.MemoryView":883
   13900             :  *         if not is_slice:
   13901             :  *             if new_ndim == 0:
   13902             :  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
   13903             :  *             else:
   13904             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13905             :  */
   13906           0 :         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
   13907             : 
   13908             :         /* "View.MemoryView":882
   13909             :  *     if suboffset >= 0:
   13910             :  *         if not is_slice:
   13911             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13912             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13913             :  *             else:
   13914             :  */
   13915           0 :         goto __pyx_L22;
   13916             :       }
   13917             : 
   13918             :       /* "View.MemoryView":885
   13919             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13920             :  *             else:
   13921             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
   13922             :  *                                      "must be indexed and not sliced", dim)
   13923             :  *         else:
   13924             :  */
   13925             :       /*else*/ {
   13926             : 
   13927             :         /* "View.MemoryView":886
   13928             :  *             else:
   13929             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13930             :  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
   13931             :  *         else:
   13932             :  *             suboffset_dim[0] = new_ndim
   13933             :  */
   13934           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
   13935             :       }
   13936           0 :       __pyx_L22:;
   13937             : 
   13938             :       /* "View.MemoryView":881
   13939             :  * 
   13940             :  *     if suboffset >= 0:
   13941             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13942             :  *             if new_ndim == 0:
   13943             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13944             :  */
   13945           0 :       goto __pyx_L21;
   13946             :     }
   13947             : 
   13948             :     /* "View.MemoryView":888
   13949             :  *                                      "must be indexed and not sliced", dim)
   13950             :  *         else:
   13951             :  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
   13952             :  * 
   13953             :  *     return 0
   13954             :  */
   13955             :     /*else*/ {
   13956           0 :       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
   13957             :     }
   13958           0 :     __pyx_L21:;
   13959             : 
   13960             :     /* "View.MemoryView":880
   13961             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13962             :  * 
   13963             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13964             :  *         if not is_slice:
   13965             :  *             if new_ndim == 0:
   13966             :  */
   13967             :   }
   13968             : 
   13969             :   /* "View.MemoryView":890
   13970             :  *             suboffset_dim[0] = new_ndim
   13971             :  * 
   13972             :  *     return 0             # <<<<<<<<<<<<<<
   13973             :  * 
   13974             :  * 
   13975             :  */
   13976           0 :   __pyx_r = 0;
   13977           0 :   goto __pyx_L0;
   13978             : 
   13979             :   /* "View.MemoryView":793
   13980             :  * 
   13981             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13982             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13983             :  *         __Pyx_memviewslice *dst,
   13984             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13985             :  */
   13986             : 
   13987             :   /* function exit code */
   13988           0 :   __pyx_L1_error:;
   13989             :   #ifdef WITH_THREAD
   13990           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   13991             :   #endif
   13992           0 :   __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13993           0 :   __pyx_r = -1;
   13994             :   #ifdef WITH_THREAD
   13995           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   13996             :   #endif
   13997           0 :   __pyx_L0:;
   13998           0 :   return __pyx_r;
   13999             : }
   14000             : 
   14001             : /* "View.MemoryView":896
   14002             :  * 
   14003             :  * @cname('__pyx_pybuffer_index')
   14004             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14005             :  *                           Py_ssize_t dim) except NULL:
   14006             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14007             :  */
   14008             : 
   14009           0 : static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
   14010           0 :   Py_ssize_t __pyx_v_shape;
   14011           0 :   Py_ssize_t __pyx_v_stride;
   14012           0 :   Py_ssize_t __pyx_v_suboffset;
   14013           0 :   Py_ssize_t __pyx_v_itemsize;
   14014           0 :   char *__pyx_v_resultp;
   14015           0 :   char *__pyx_r;
   14016             :   __Pyx_RefNannyDeclarations
   14017           0 :   Py_ssize_t __pyx_t_1;
   14018           0 :   int __pyx_t_2;
   14019           0 :   PyObject *__pyx_t_3 = NULL;
   14020           0 :   Py_UCS4 __pyx_t_4;
   14021           0 :   PyObject *__pyx_t_5 = NULL;
   14022           0 :   int __pyx_lineno = 0;
   14023           0 :   const char *__pyx_filename = NULL;
   14024           0 :   int __pyx_clineno = 0;
   14025           0 :   __Pyx_RefNannySetupContext("pybuffer_index", 1);
   14026             : 
   14027             :   /* "View.MemoryView":898
   14028             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
   14029             :  *                           Py_ssize_t dim) except NULL:
   14030             :  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
   14031             :  *     cdef Py_ssize_t itemsize = view.itemsize
   14032             :  *     cdef char *resultp
   14033             :  */
   14034           0 :   __pyx_v_suboffset = -1L;
   14035             : 
   14036             :   /* "View.MemoryView":899
   14037             :  *                           Py_ssize_t dim) except NULL:
   14038             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14039             :  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
   14040             :  *     cdef char *resultp
   14041             :  * 
   14042             :  */
   14043           0 :   __pyx_t_1 = __pyx_v_view->itemsize;
   14044           0 :   __pyx_v_itemsize = __pyx_t_1;
   14045             : 
   14046             :   /* "View.MemoryView":902
   14047             :  *     cdef char *resultp
   14048             :  * 
   14049             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   14050             :  *         shape = view.len // itemsize
   14051             :  *         stride = itemsize
   14052             :  */
   14053           0 :   __pyx_t_2 = (__pyx_v_view->ndim == 0);
   14054           0 :   if (__pyx_t_2) {
   14055             : 
   14056             :     /* "View.MemoryView":903
   14057             :  * 
   14058             :  *     if view.ndim == 0:
   14059             :  *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
   14060             :  *         stride = itemsize
   14061             :  *     else:
   14062             :  */
   14063           0 :     if (unlikely(__pyx_v_itemsize == 0)) {
   14064           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
   14065           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   14066             :     }
   14067           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
   14068           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
   14069           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   14070             :     }
   14071           0 :     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
   14072             : 
   14073             :     /* "View.MemoryView":904
   14074             :  *     if view.ndim == 0:
   14075             :  *         shape = view.len // itemsize
   14076             :  *         stride = itemsize             # <<<<<<<<<<<<<<
   14077             :  *     else:
   14078             :  *         shape = view.shape[dim]
   14079             :  */
   14080           0 :     __pyx_v_stride = __pyx_v_itemsize;
   14081             : 
   14082             :     /* "View.MemoryView":902
   14083             :  *     cdef char *resultp
   14084             :  * 
   14085             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   14086             :  *         shape = view.len // itemsize
   14087             :  *         stride = itemsize
   14088             :  */
   14089           0 :     goto __pyx_L3;
   14090             :   }
   14091             : 
   14092             :   /* "View.MemoryView":906
   14093             :  *         stride = itemsize
   14094             :  *     else:
   14095             :  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
   14096             :  *         stride = view.strides[dim]
   14097             :  *         if view.suboffsets != NULL:
   14098             :  */
   14099             :   /*else*/ {
   14100           0 :     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
   14101             : 
   14102             :     /* "View.MemoryView":907
   14103             :  *     else:
   14104             :  *         shape = view.shape[dim]
   14105             :  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
   14106             :  *         if view.suboffsets != NULL:
   14107             :  *             suboffset = view.suboffsets[dim]
   14108             :  */
   14109           0 :     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
   14110             : 
   14111             :     /* "View.MemoryView":908
   14112             :  *         shape = view.shape[dim]
   14113             :  *         stride = view.strides[dim]
   14114             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   14115             :  *             suboffset = view.suboffsets[dim]
   14116             :  * 
   14117             :  */
   14118           0 :     __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
   14119           0 :     if (__pyx_t_2) {
   14120             : 
   14121             :       /* "View.MemoryView":909
   14122             :  *         stride = view.strides[dim]
   14123             :  *         if view.suboffsets != NULL:
   14124             :  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
   14125             :  * 
   14126             :  *     if index < 0:
   14127             :  */
   14128           0 :       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
   14129             : 
   14130             :       /* "View.MemoryView":908
   14131             :  *         shape = view.shape[dim]
   14132             :  *         stride = view.strides[dim]
   14133             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   14134             :  *             suboffset = view.suboffsets[dim]
   14135             :  * 
   14136             :  */
   14137             :     }
   14138             :   }
   14139           0 :   __pyx_L3:;
   14140             : 
   14141             :   /* "View.MemoryView":911
   14142             :  *             suboffset = view.suboffsets[dim]
   14143             :  * 
   14144             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14145             :  *         index += view.shape[dim]
   14146             :  *         if index < 0:
   14147             :  */
   14148           0 :   __pyx_t_2 = (__pyx_v_index < 0);
   14149           0 :   if (__pyx_t_2) {
   14150             : 
   14151             :     /* "View.MemoryView":912
   14152             :  * 
   14153             :  *     if index < 0:
   14154             :  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
   14155             :  *         if index < 0:
   14156             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14157             :  */
   14158           0 :     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
   14159             : 
   14160             :     /* "View.MemoryView":913
   14161             :  *     if index < 0:
   14162             :  *         index += view.shape[dim]
   14163             :  *         if index < 0:             # <<<<<<<<<<<<<<
   14164             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14165             :  * 
   14166             :  */
   14167           0 :     __pyx_t_2 = (__pyx_v_index < 0);
   14168           0 :     if (unlikely(__pyx_t_2)) {
   14169             : 
   14170             :       /* "View.MemoryView":914
   14171             :  *         index += view.shape[dim]
   14172             :  *         if index < 0:
   14173             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14174             :  * 
   14175             :  *     if index >= shape:
   14176             :  */
   14177           0 :       __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
   14178           0 :       __Pyx_GOTREF(__pyx_t_3);
   14179           0 :       __pyx_t_1 = 0;
   14180           0 :       __pyx_t_4 = 127;
   14181           0 :       __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14182           0 :       __pyx_t_1 += 37;
   14183           0 :       __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14184           0 :       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14185           0 :       __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14186           0 :       __Pyx_GOTREF(__pyx_t_5);
   14187           0 :       __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
   14188           0 :       __Pyx_GIVEREF(__pyx_t_5);
   14189           0 :       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   14190           0 :       __pyx_t_5 = 0;
   14191           0 :       __Pyx_INCREF(__pyx_kp_u__7);
   14192           0 :       __pyx_t_1 += 1;
   14193           0 :       __Pyx_GIVEREF(__pyx_kp_u__7);
   14194           0 :       PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7);
   14195           0 :       __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14196           0 :       __Pyx_GOTREF(__pyx_t_5);
   14197           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14198           0 :       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
   14199           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14200           0 :       __PYX_ERR(1, 914, __pyx_L1_error)
   14201             : 
   14202             :       /* "View.MemoryView":913
   14203             :  *     if index < 0:
   14204             :  *         index += view.shape[dim]
   14205             :  *         if index < 0:             # <<<<<<<<<<<<<<
   14206             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14207             :  * 
   14208             :  */
   14209             :     }
   14210             : 
   14211             :     /* "View.MemoryView":911
   14212             :  *             suboffset = view.suboffsets[dim]
   14213             :  * 
   14214             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14215             :  *         index += view.shape[dim]
   14216             :  *         if index < 0:
   14217             :  */
   14218             :   }
   14219             : 
   14220             :   /* "View.MemoryView":916
   14221             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14222             :  * 
   14223             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14224             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14225             :  * 
   14226             :  */
   14227           0 :   __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
   14228           0 :   if (unlikely(__pyx_t_2)) {
   14229             : 
   14230             :     /* "View.MemoryView":917
   14231             :  * 
   14232             :  *     if index >= shape:
   14233             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14234             :  * 
   14235             :  *     resultp = bufp + index * stride
   14236             :  */
   14237           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
   14238           0 :     __Pyx_GOTREF(__pyx_t_5);
   14239           0 :     __pyx_t_1 = 0;
   14240           0 :     __pyx_t_4 = 127;
   14241           0 :     __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14242           0 :     __pyx_t_1 += 37;
   14243           0 :     __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14244           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14245           0 :     __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14246           0 :     __Pyx_GOTREF(__pyx_t_3);
   14247           0 :     __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
   14248           0 :     __Pyx_GIVEREF(__pyx_t_3);
   14249           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
   14250           0 :     __pyx_t_3 = 0;
   14251           0 :     __Pyx_INCREF(__pyx_kp_u__7);
   14252           0 :     __pyx_t_1 += 1;
   14253           0 :     __Pyx_GIVEREF(__pyx_kp_u__7);
   14254           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7);
   14255           0 :     __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14256           0 :     __Pyx_GOTREF(__pyx_t_3);
   14257           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14258           0 :     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
   14259           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14260           0 :     __PYX_ERR(1, 917, __pyx_L1_error)
   14261             : 
   14262             :     /* "View.MemoryView":916
   14263             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14264             :  * 
   14265             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14266             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14267             :  * 
   14268             :  */
   14269             :   }
   14270             : 
   14271             :   /* "View.MemoryView":919
   14272             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14273             :  * 
   14274             :  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
   14275             :  *     if suboffset >= 0:
   14276             :  *         resultp = (<char **> resultp)[0] + suboffset
   14277             :  */
   14278           0 :   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
   14279             : 
   14280             :   /* "View.MemoryView":920
   14281             :  * 
   14282             :  *     resultp = bufp + index * stride
   14283             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14284             :  *         resultp = (<char **> resultp)[0] + suboffset
   14285             :  * 
   14286             :  */
   14287           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   14288           0 :   if (__pyx_t_2) {
   14289             : 
   14290             :     /* "View.MemoryView":921
   14291             :  *     resultp = bufp + index * stride
   14292             :  *     if suboffset >= 0:
   14293             :  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
   14294             :  * 
   14295             :  *     return resultp
   14296             :  */
   14297           0 :     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
   14298             : 
   14299             :     /* "View.MemoryView":920
   14300             :  * 
   14301             :  *     resultp = bufp + index * stride
   14302             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14303             :  *         resultp = (<char **> resultp)[0] + suboffset
   14304             :  * 
   14305             :  */
   14306             :   }
   14307             : 
   14308             :   /* "View.MemoryView":923
   14309             :  *         resultp = (<char **> resultp)[0] + suboffset
   14310             :  * 
   14311             :  *     return resultp             # <<<<<<<<<<<<<<
   14312             :  * 
   14313             :  * 
   14314             :  */
   14315           0 :   __pyx_r = __pyx_v_resultp;
   14316           0 :   goto __pyx_L0;
   14317             : 
   14318             :   /* "View.MemoryView":896
   14319             :  * 
   14320             :  * @cname('__pyx_pybuffer_index')
   14321             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14322             :  *                           Py_ssize_t dim) except NULL:
   14323             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14324             :  */
   14325             : 
   14326             :   /* function exit code */
   14327           0 :   __pyx_L1_error:;
   14328           0 :   __Pyx_XDECREF(__pyx_t_3);
   14329           0 :   __Pyx_XDECREF(__pyx_t_5);
   14330           0 :   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14331           0 :   __pyx_r = NULL;
   14332           0 :   __pyx_L0:;
   14333           0 :   __Pyx_RefNannyFinishContext();
   14334           0 :   return __pyx_r;
   14335             : }
   14336             : 
   14337             : /* "View.MemoryView":929
   14338             :  * 
   14339             :  * @cname('__pyx_memslice_transpose')
   14340             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14341             :  *     cdef int ndim = memslice.memview.view.ndim
   14342             :  * 
   14343             :  */
   14344             : 
   14345           0 : static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
   14346           0 :   int __pyx_v_ndim;
   14347           0 :   Py_ssize_t *__pyx_v_shape;
   14348           0 :   Py_ssize_t *__pyx_v_strides;
   14349           0 :   int __pyx_v_i;
   14350           0 :   int __pyx_v_j;
   14351           0 :   int __pyx_r;
   14352           0 :   int __pyx_t_1;
   14353           0 :   Py_ssize_t *__pyx_t_2;
   14354           0 :   long __pyx_t_3;
   14355           0 :   long __pyx_t_4;
   14356           0 :   Py_ssize_t __pyx_t_5;
   14357           0 :   Py_ssize_t __pyx_t_6;
   14358           0 :   int __pyx_t_7;
   14359           0 :   int __pyx_t_8;
   14360           0 :   int __pyx_t_9;
   14361           0 :   int __pyx_lineno = 0;
   14362           0 :   const char *__pyx_filename = NULL;
   14363           0 :   int __pyx_clineno = 0;
   14364             :   #ifdef WITH_THREAD
   14365           0 :   PyGILState_STATE __pyx_gilstate_save;
   14366             :   #endif
   14367             : 
   14368             :   /* "View.MemoryView":930
   14369             :  * @cname('__pyx_memslice_transpose')
   14370             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
   14371             :  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
   14372             :  * 
   14373             :  *     cdef Py_ssize_t *shape = memslice.shape
   14374             :  */
   14375           0 :   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
   14376           0 :   __pyx_v_ndim = __pyx_t_1;
   14377             : 
   14378             :   /* "View.MemoryView":932
   14379             :  *     cdef int ndim = memslice.memview.view.ndim
   14380             :  * 
   14381             :  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
   14382             :  *     cdef Py_ssize_t *strides = memslice.strides
   14383             :  * 
   14384             :  */
   14385           0 :   __pyx_t_2 = __pyx_v_memslice->shape;
   14386           0 :   __pyx_v_shape = __pyx_t_2;
   14387             : 
   14388             :   /* "View.MemoryView":933
   14389             :  * 
   14390             :  *     cdef Py_ssize_t *shape = memslice.shape
   14391             :  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
   14392             :  * 
   14393             :  * 
   14394             :  */
   14395           0 :   __pyx_t_2 = __pyx_v_memslice->strides;
   14396           0 :   __pyx_v_strides = __pyx_t_2;
   14397             : 
   14398             :   /* "View.MemoryView":937
   14399             :  * 
   14400             :  *     cdef int i, j
   14401             :  *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
   14402             :  *         j = ndim - 1 - i
   14403             :  *         strides[i], strides[j] = strides[j], strides[i]
   14404             :  */
   14405           0 :   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
   14406           0 :   __pyx_t_4 = __pyx_t_3;
   14407           0 :   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
   14408           0 :     __pyx_v_i = __pyx_t_1;
   14409             : 
   14410             :     /* "View.MemoryView":938
   14411             :  *     cdef int i, j
   14412             :  *     for i in range(ndim // 2):
   14413             :  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
   14414             :  *         strides[i], strides[j] = strides[j], strides[i]
   14415             :  *         shape[i], shape[j] = shape[j], shape[i]
   14416             :  */
   14417           0 :     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
   14418             : 
   14419             :     /* "View.MemoryView":939
   14420             :  *     for i in range(ndim // 2):
   14421             :  *         j = ndim - 1 - i
   14422             :  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
   14423             :  *         shape[i], shape[j] = shape[j], shape[i]
   14424             :  * 
   14425             :  */
   14426           0 :     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
   14427           0 :     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
   14428           0 :     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
   14429           0 :     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
   14430             : 
   14431             :     /* "View.MemoryView":940
   14432             :  *         j = ndim - 1 - i
   14433             :  *         strides[i], strides[j] = strides[j], strides[i]
   14434             :  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
   14435             :  * 
   14436             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14437             :  */
   14438           0 :     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
   14439           0 :     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
   14440           0 :     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
   14441           0 :     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
   14442             : 
   14443             :     /* "View.MemoryView":942
   14444             :  *         shape[i], shape[j] = shape[j], shape[i]
   14445             :  * 
   14446             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14447             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14448             :  * 
   14449             :  */
   14450           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
   14451           0 :     if (!__pyx_t_8) {
   14452           0 :     } else {
   14453           0 :       __pyx_t_7 = __pyx_t_8;
   14454           0 :       goto __pyx_L6_bool_binop_done;
   14455             :     }
   14456           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
   14457           0 :     __pyx_t_7 = __pyx_t_8;
   14458           0 :     __pyx_L6_bool_binop_done:;
   14459           0 :     if (__pyx_t_7) {
   14460             : 
   14461             :       /* "View.MemoryView":943
   14462             :  * 
   14463             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14464             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
   14465             :  * 
   14466             :  *     return 0
   14467             :  */
   14468           0 :       __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
   14469             : 
   14470             :       /* "View.MemoryView":942
   14471             :  *         shape[i], shape[j] = shape[j], shape[i]
   14472             :  * 
   14473             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14474             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14475             :  * 
   14476             :  */
   14477             :     }
   14478             :   }
   14479             : 
   14480             :   /* "View.MemoryView":945
   14481             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14482             :  * 
   14483             :  *     return 0             # <<<<<<<<<<<<<<
   14484             :  * 
   14485             :  * 
   14486             :  */
   14487           0 :   __pyx_r = 0;
   14488           0 :   goto __pyx_L0;
   14489             : 
   14490             :   /* "View.MemoryView":929
   14491             :  * 
   14492             :  * @cname('__pyx_memslice_transpose')
   14493             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14494             :  *     cdef int ndim = memslice.memview.view.ndim
   14495             :  * 
   14496             :  */
   14497             : 
   14498             :   /* function exit code */
   14499           0 :   __pyx_L1_error:;
   14500             :   #ifdef WITH_THREAD
   14501           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   14502             :   #endif
   14503           0 :   __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14504           0 :   __pyx_r = -1;
   14505             :   #ifdef WITH_THREAD
   14506           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   14507             :   #endif
   14508           0 :   __pyx_L0:;
   14509           0 :   return __pyx_r;
   14510             : }
   14511             : 
   14512             : /* "View.MemoryView":963
   14513             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14514             :  * 
   14515             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14516             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14517             :  * 
   14518             :  */
   14519             : 
   14520             : /* Python wrapper */
   14521             : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
   14522           0 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
   14523           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14524             :   __Pyx_RefNannyDeclarations
   14525           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   14526           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   14527           0 :   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14528             : 
   14529             :   /* function exit code */
   14530           0 :   __Pyx_RefNannyFinishContext();
   14531             : }
   14532             : 
   14533           0 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14534             : 
   14535             :   /* "View.MemoryView":964
   14536             :  * 
   14537             :  *     def __dealloc__(self):
   14538             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
   14539             :  * 
   14540             :  *     cdef convert_item_to_object(self, char *itemp):
   14541             :  */
   14542           0 :   __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
   14543             : 
   14544             :   /* "View.MemoryView":963
   14545             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14546             :  * 
   14547             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14548             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14549             :  * 
   14550             :  */
   14551             : 
   14552             :   /* function exit code */
   14553             : }
   14554             : 
   14555             : /* "View.MemoryView":966
   14556             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14557             :  * 
   14558             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14559             :  *         if self.to_object_func != NULL:
   14560             :  *             return self.to_object_func(itemp)
   14561             :  */
   14562             : 
   14563           0 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
   14564           0 :   PyObject *__pyx_r = NULL;
   14565             :   __Pyx_RefNannyDeclarations
   14566           0 :   int __pyx_t_1;
   14567           0 :   PyObject *__pyx_t_2 = NULL;
   14568           0 :   int __pyx_lineno = 0;
   14569           0 :   const char *__pyx_filename = NULL;
   14570           0 :   int __pyx_clineno = 0;
   14571           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
   14572             : 
   14573             :   /* "View.MemoryView":967
   14574             :  * 
   14575             :  *     cdef convert_item_to_object(self, char *itemp):
   14576             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14577             :  *             return self.to_object_func(itemp)
   14578             :  *         else:
   14579             :  */
   14580           0 :   __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
   14581           0 :   if (__pyx_t_1) {
   14582             : 
   14583             :     /* "View.MemoryView":968
   14584             :  *     cdef convert_item_to_object(self, char *itemp):
   14585             :  *         if self.to_object_func != NULL:
   14586             :  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
   14587             :  *         else:
   14588             :  *             return memoryview.convert_item_to_object(self, itemp)
   14589             :  */
   14590           0 :     __Pyx_XDECREF(__pyx_r);
   14591           0 :     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
   14592           0 :     __Pyx_GOTREF(__pyx_t_2);
   14593           0 :     __pyx_r = __pyx_t_2;
   14594           0 :     __pyx_t_2 = 0;
   14595           0 :     goto __pyx_L0;
   14596             : 
   14597             :     /* "View.MemoryView":967
   14598             :  * 
   14599             :  *     cdef convert_item_to_object(self, char *itemp):
   14600             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14601             :  *             return self.to_object_func(itemp)
   14602             :  *         else:
   14603             :  */
   14604             :   }
   14605             : 
   14606             :   /* "View.MemoryView":970
   14607             :  *             return self.to_object_func(itemp)
   14608             :  *         else:
   14609             :  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
   14610             :  * 
   14611             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14612             :  */
   14613             :   /*else*/ {
   14614           0 :     __Pyx_XDECREF(__pyx_r);
   14615           0 :     __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
   14616           0 :     __Pyx_GOTREF(__pyx_t_2);
   14617           0 :     __pyx_r = __pyx_t_2;
   14618           0 :     __pyx_t_2 = 0;
   14619           0 :     goto __pyx_L0;
   14620             :   }
   14621             : 
   14622             :   /* "View.MemoryView":966
   14623             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14624             :  * 
   14625             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14626             :  *         if self.to_object_func != NULL:
   14627             :  *             return self.to_object_func(itemp)
   14628             :  */
   14629             : 
   14630             :   /* function exit code */
   14631           0 :   __pyx_L1_error:;
   14632           0 :   __Pyx_XDECREF(__pyx_t_2);
   14633           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14634           0 :   __pyx_r = 0;
   14635           0 :   __pyx_L0:;
   14636           0 :   __Pyx_XGIVEREF(__pyx_r);
   14637           0 :   __Pyx_RefNannyFinishContext();
   14638           0 :   return __pyx_r;
   14639             : }
   14640             : 
   14641             : /* "View.MemoryView":972
   14642             :  *             return memoryview.convert_item_to_object(self, itemp)
   14643             :  * 
   14644             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14645             :  *         if self.to_dtype_func != NULL:
   14646             :  *             self.to_dtype_func(itemp, value)
   14647             :  */
   14648             : 
   14649           0 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
   14650           0 :   PyObject *__pyx_r = NULL;
   14651             :   __Pyx_RefNannyDeclarations
   14652           0 :   int __pyx_t_1;
   14653           0 :   int __pyx_t_2;
   14654           0 :   PyObject *__pyx_t_3 = NULL;
   14655           0 :   int __pyx_lineno = 0;
   14656           0 :   const char *__pyx_filename = NULL;
   14657           0 :   int __pyx_clineno = 0;
   14658           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
   14659             : 
   14660             :   /* "View.MemoryView":973
   14661             :  * 
   14662             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14663             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14664             :  *             self.to_dtype_func(itemp, value)
   14665             :  *         else:
   14666             :  */
   14667           0 :   __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
   14668           0 :   if (__pyx_t_1) {
   14669             : 
   14670             :     /* "View.MemoryView":974
   14671             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14672             :  *         if self.to_dtype_func != NULL:
   14673             :  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
   14674             :  *         else:
   14675             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14676             :  */
   14677           0 :     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)
   14678             : 
   14679             :     /* "View.MemoryView":973
   14680             :  * 
   14681             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14682             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14683             :  *             self.to_dtype_func(itemp, value)
   14684             :  *         else:
   14685             :  */
   14686           0 :     goto __pyx_L3;
   14687             :   }
   14688             : 
   14689             :   /* "View.MemoryView":976
   14690             :  *             self.to_dtype_func(itemp, value)
   14691             :  *         else:
   14692             :  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
   14693             :  * 
   14694             :  *     cdef _get_base(self):
   14695             :  */
   14696             :   /*else*/ {
   14697           0 :     __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
   14698           0 :     __Pyx_GOTREF(__pyx_t_3);
   14699           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14700             :   }
   14701           0 :   __pyx_L3:;
   14702             : 
   14703             :   /* "View.MemoryView":972
   14704             :  *             return memoryview.convert_item_to_object(self, itemp)
   14705             :  * 
   14706             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14707             :  *         if self.to_dtype_func != NULL:
   14708             :  *             self.to_dtype_func(itemp, value)
   14709             :  */
   14710             : 
   14711             :   /* function exit code */
   14712           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   14713           0 :   goto __pyx_L0;
   14714           0 :   __pyx_L1_error:;
   14715           0 :   __Pyx_XDECREF(__pyx_t_3);
   14716           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14717           0 :   __pyx_r = 0;
   14718           0 :   __pyx_L0:;
   14719           0 :   __Pyx_XGIVEREF(__pyx_r);
   14720           0 :   __Pyx_RefNannyFinishContext();
   14721           0 :   return __pyx_r;
   14722             : }
   14723             : 
   14724             : /* "View.MemoryView":978
   14725             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14726             :  * 
   14727             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14728             :  *         return self.from_object
   14729             :  * 
   14730             :  */
   14731             : 
   14732           0 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14733           0 :   PyObject *__pyx_r = NULL;
   14734             :   __Pyx_RefNannyDeclarations
   14735           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   14736             : 
   14737             :   /* "View.MemoryView":979
   14738             :  * 
   14739             :  *     cdef _get_base(self):
   14740             :  *         return self.from_object             # <<<<<<<<<<<<<<
   14741             :  * 
   14742             :  * 
   14743             :  */
   14744           0 :   __Pyx_XDECREF(__pyx_r);
   14745           0 :   __Pyx_INCREF(__pyx_v_self->from_object);
   14746           0 :   __pyx_r = __pyx_v_self->from_object;
   14747           0 :   goto __pyx_L0;
   14748             : 
   14749             :   /* "View.MemoryView":978
   14750             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14751             :  * 
   14752             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14753             :  *         return self.from_object
   14754             :  * 
   14755             :  */
   14756             : 
   14757             :   /* function exit code */
   14758           0 :   __pyx_L0:;
   14759           0 :   __Pyx_XGIVEREF(__pyx_r);
   14760           0 :   __Pyx_RefNannyFinishContext();
   14761           0 :   return __pyx_r;
   14762             : }
   14763             : 
   14764             : /* "(tree fragment)":1
   14765             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14766             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14767             :  * def __setstate_cython__(self, __pyx_state):
   14768             :  */
   14769             : 
   14770             : /* Python wrapper */
   14771             : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14772             : #if CYTHON_METH_FASTCALL
   14773             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14774             : #else
   14775             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14776             : #endif
   14777             : ); /*proto*/
   14778           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14779             : #if CYTHON_METH_FASTCALL
   14780             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14781             : #else
   14782             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14783             : #endif
   14784             : ) {
   14785             :   #if !CYTHON_METH_FASTCALL
   14786             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14787             :   #endif
   14788           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14789           0 :   PyObject *__pyx_r = 0;
   14790             :   __Pyx_RefNannyDeclarations
   14791           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   14792             :   #if !CYTHON_METH_FASTCALL
   14793             :   #if CYTHON_ASSUME_SAFE_MACROS
   14794             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14795             :   #else
   14796             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14797             :   #endif
   14798             :   #endif
   14799           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14800           0 :   if (unlikely(__pyx_nargs > 0)) {
   14801           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   14802           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   14803           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14804             : 
   14805             :   /* function exit code */
   14806           0 :   __Pyx_RefNannyFinishContext();
   14807           0 :   return __pyx_r;
   14808             : }
   14809             : 
   14810           0 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14811           0 :   PyObject *__pyx_r = NULL;
   14812             :   __Pyx_RefNannyDeclarations
   14813           0 :   int __pyx_lineno = 0;
   14814           0 :   const char *__pyx_filename = NULL;
   14815           0 :   int __pyx_clineno = 0;
   14816           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   14817             : 
   14818             :   /* "(tree fragment)":2
   14819             :  * def __reduce_cython__(self):
   14820             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14821             :  * def __setstate_cython__(self, __pyx_state):
   14822             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14823             :  */
   14824           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14825           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   14826             : 
   14827             :   /* "(tree fragment)":1
   14828             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14829             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14830             :  * def __setstate_cython__(self, __pyx_state):
   14831             :  */
   14832             : 
   14833             :   /* function exit code */
   14834           0 :   __pyx_L1_error:;
   14835           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14836           0 :   __pyx_r = NULL;
   14837           0 :   __Pyx_XGIVEREF(__pyx_r);
   14838           0 :   __Pyx_RefNannyFinishContext();
   14839           0 :   return __pyx_r;
   14840             : }
   14841             : 
   14842             : /* "(tree fragment)":3
   14843             :  * def __reduce_cython__(self):
   14844             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14845             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14846             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14847             :  */
   14848             : 
   14849             : /* Python wrapper */
   14850             : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14851             : #if CYTHON_METH_FASTCALL
   14852             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14853             : #else
   14854             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14855             : #endif
   14856             : ); /*proto*/
   14857           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14858             : #if CYTHON_METH_FASTCALL
   14859             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14860             : #else
   14861             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14862             : #endif
   14863             : ) {
   14864           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   14865             :   #if !CYTHON_METH_FASTCALL
   14866             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14867             :   #endif
   14868           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14869           0 :   PyObject* values[1] = {0};
   14870           0 :   int __pyx_lineno = 0;
   14871           0 :   const char *__pyx_filename = NULL;
   14872           0 :   int __pyx_clineno = 0;
   14873           0 :   PyObject *__pyx_r = 0;
   14874             :   __Pyx_RefNannyDeclarations
   14875           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   14876             :   #if !CYTHON_METH_FASTCALL
   14877             :   #if CYTHON_ASSUME_SAFE_MACROS
   14878             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14879             :   #else
   14880             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14881             :   #endif
   14882             :   #endif
   14883           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14884             :   {
   14885           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   14886           0 :     if (__pyx_kwds) {
   14887           0 :       Py_ssize_t kw_args;
   14888           0 :       switch (__pyx_nargs) {
   14889           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14890           0 :         CYTHON_FALLTHROUGH;
   14891           0 :         case  0: break;
   14892           0 :         default: goto __pyx_L5_argtuple_error;
   14893             :       }
   14894           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   14895           0 :       switch (__pyx_nargs) {
   14896             :         case  0:
   14897           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   14898           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   14899           0 :           kw_args--;
   14900             :         }
   14901           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   14902           0 :         else goto __pyx_L5_argtuple_error;
   14903             :       }
   14904           0 :       if (unlikely(kw_args > 0)) {
   14905           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   14906           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   14907             :       }
   14908           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   14909           0 :       goto __pyx_L5_argtuple_error;
   14910             :     } else {
   14911           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14912             :     }
   14913           0 :     __pyx_v___pyx_state = values[0];
   14914             :   }
   14915           0 :   goto __pyx_L6_skip;
   14916           0 :   __pyx_L5_argtuple_error:;
   14917           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   14918           0 :   __pyx_L6_skip:;
   14919           0 :   goto __pyx_L4_argument_unpacking_done;
   14920           0 :   __pyx_L3_error:;
   14921             :   {
   14922           0 :     Py_ssize_t __pyx_temp;
   14923           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14924             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14925             :     }
   14926             :   }
   14927           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14928           0 :   __Pyx_RefNannyFinishContext();
   14929           0 :   return NULL;
   14930           0 :   __pyx_L4_argument_unpacking_done:;
   14931           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
   14932             : 
   14933             :   /* function exit code */
   14934             :   {
   14935           0 :     Py_ssize_t __pyx_temp;
   14936           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14937             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14938             :     }
   14939             :   }
   14940             :   __Pyx_RefNannyFinishContext();
   14941             :   return __pyx_r;
   14942             : }
   14943             : 
   14944           0 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   14945           0 :   PyObject *__pyx_r = NULL;
   14946             :   __Pyx_RefNannyDeclarations
   14947           0 :   int __pyx_lineno = 0;
   14948           0 :   const char *__pyx_filename = NULL;
   14949           0 :   int __pyx_clineno = 0;
   14950           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   14951             : 
   14952             :   /* "(tree fragment)":4
   14953             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14954             :  * def __setstate_cython__(self, __pyx_state):
   14955             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14956             :  */
   14957           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14958           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   14959             : 
   14960             :   /* "(tree fragment)":3
   14961             :  * def __reduce_cython__(self):
   14962             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14963             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14964             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14965             :  */
   14966             : 
   14967             :   /* function exit code */
   14968           0 :   __pyx_L1_error:;
   14969           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14970           0 :   __pyx_r = NULL;
   14971           0 :   __Pyx_XGIVEREF(__pyx_r);
   14972           0 :   __Pyx_RefNannyFinishContext();
   14973           0 :   return __pyx_r;
   14974             : }
   14975             : 
   14976             : /* "View.MemoryView":999
   14977             :  * 
   14978             :  * @cname('__pyx_memoryview_fromslice')
   14979             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   14980             :  *                           int ndim,
   14981             :  *                           object (*to_object_func)(char *),
   14982             :  */
   14983             : 
   14984           0 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
   14985           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   14986           0 :   Py_ssize_t __pyx_v_suboffset;
   14987           0 :   PyObject *__pyx_v_length = NULL;
   14988           0 :   PyObject *__pyx_r = NULL;
   14989             :   __Pyx_RefNannyDeclarations
   14990           0 :   int __pyx_t_1;
   14991           0 :   PyObject *__pyx_t_2 = NULL;
   14992           0 :   PyObject *__pyx_t_3 = NULL;
   14993           0 :   __Pyx_TypeInfo *__pyx_t_4;
   14994           0 :   Py_buffer __pyx_t_5;
   14995           0 :   Py_ssize_t *__pyx_t_6;
   14996           0 :   Py_ssize_t *__pyx_t_7;
   14997           0 :   Py_ssize_t *__pyx_t_8;
   14998           0 :   Py_ssize_t __pyx_t_9;
   14999           0 :   int __pyx_lineno = 0;
   15000           0 :   const char *__pyx_filename = NULL;
   15001           0 :   int __pyx_clineno = 0;
   15002           0 :   __Pyx_RefNannySetupContext("memoryview_fromslice", 1);
   15003             : 
   15004             :   /* "View.MemoryView":1007
   15005             :  *     cdef _memoryviewslice result
   15006             :  * 
   15007             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   15008             :  *         return None
   15009             :  * 
   15010             :  */
   15011           0 :   __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
   15012           0 :   if (__pyx_t_1) {
   15013             : 
   15014             :     /* "View.MemoryView":1008
   15015             :  * 
   15016             :  *     if <PyObject *> memviewslice.memview == Py_None:
   15017             :  *         return None             # <<<<<<<<<<<<<<
   15018             :  * 
   15019             :  * 
   15020             :  */
   15021           0 :     __Pyx_XDECREF(__pyx_r);
   15022           0 :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   15023           0 :     goto __pyx_L0;
   15024             : 
   15025             :     /* "View.MemoryView":1007
   15026             :  *     cdef _memoryviewslice result
   15027             :  * 
   15028             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   15029             :  *         return None
   15030             :  * 
   15031             :  */
   15032             :   }
   15033             : 
   15034             :   /* "View.MemoryView":1013
   15035             :  * 
   15036             :  * 
   15037             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
   15038             :  * 
   15039             :  *     result.from_slice = memviewslice
   15040             :  */
   15041           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15042           0 :   __Pyx_GOTREF(__pyx_t_2);
   15043           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15044           0 :   __Pyx_GOTREF(__pyx_t_3);
   15045           0 :   __Pyx_INCREF(Py_None);
   15046           0 :   __Pyx_GIVEREF(Py_None);
   15047           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15048           0 :   __Pyx_INCREF(__pyx_int_0);
   15049           0 :   __Pyx_GIVEREF(__pyx_int_0);
   15050           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15051           0 :   __Pyx_GIVEREF(__pyx_t_2);
   15052           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15053           0 :   __pyx_t_2 = 0;
   15054           0 :   __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15055           0 :   __Pyx_GOTREF((PyObject *)__pyx_t_2);
   15056           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15057           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15058           0 :   __pyx_t_2 = 0;
   15059             : 
   15060             :   /* "View.MemoryView":1015
   15061             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
   15062             :  * 
   15063             :  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
   15064             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   15065             :  * 
   15066             :  */
   15067           0 :   __pyx_v_result->from_slice = __pyx_v_memviewslice;
   15068             : 
   15069             :   /* "View.MemoryView":1016
   15070             :  * 
   15071             :  *     result.from_slice = memviewslice
   15072             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
   15073             :  * 
   15074             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   15075             :  */
   15076           0 :   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
   15077             : 
   15078             :   /* "View.MemoryView":1018
   15079             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   15080             :  * 
   15081             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
   15082             :  *     result.typeinfo = memviewslice.memview.typeinfo
   15083             :  * 
   15084             :  */
   15085           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
   15086           0 :   __Pyx_GOTREF(__pyx_t_2);
   15087           0 :   __Pyx_GIVEREF(__pyx_t_2);
   15088           0 :   __Pyx_GOTREF(__pyx_v_result->from_object);
   15089           0 :   __Pyx_DECREF(__pyx_v_result->from_object);
   15090           0 :   __pyx_v_result->from_object = __pyx_t_2;
   15091           0 :   __pyx_t_2 = 0;
   15092             : 
   15093             :   /* "View.MemoryView":1019
   15094             :  * 
   15095             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   15096             :  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
   15097             :  * 
   15098             :  *     result.view = memviewslice.memview.view
   15099             :  */
   15100           0 :   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
   15101           0 :   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
   15102             : 
   15103             :   /* "View.MemoryView":1021
   15104             :  *     result.typeinfo = memviewslice.memview.typeinfo
   15105             :  * 
   15106             :  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
   15107             :  *     result.view.buf = <void *> memviewslice.data
   15108             :  *     result.view.ndim = ndim
   15109             :  */
   15110           0 :   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
   15111           0 :   __pyx_v_result->__pyx_base.view = __pyx_t_5;
   15112             : 
   15113             :   /* "View.MemoryView":1022
   15114             :  * 
   15115             :  *     result.view = memviewslice.memview.view
   15116             :  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
   15117             :  *     result.view.ndim = ndim
   15118             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15119             :  */
   15120           0 :   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
   15121             : 
   15122             :   /* "View.MemoryView":1023
   15123             :  *     result.view = memviewslice.memview.view
   15124             :  *     result.view.buf = <void *> memviewslice.data
   15125             :  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
   15126             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15127             :  *     Py_INCREF(Py_None)
   15128             :  */
   15129           0 :   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
   15130             : 
   15131             :   /* "View.MemoryView":1024
   15132             :  *     result.view.buf = <void *> memviewslice.data
   15133             :  *     result.view.ndim = ndim
   15134             :  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
   15135             :  *     Py_INCREF(Py_None)
   15136             :  * 
   15137             :  */
   15138           0 :   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
   15139             : 
   15140             :   /* "View.MemoryView":1025
   15141             :  *     result.view.ndim = ndim
   15142             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15143             :  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
   15144             :  * 
   15145             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   15146             :  */
   15147           0 :   Py_INCREF(Py_None);
   15148             : 
   15149             :   /* "View.MemoryView":1027
   15150             :  *     Py_INCREF(Py_None)
   15151             :  * 
   15152             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   15153             :  *         result.flags = PyBUF_RECORDS
   15154             :  *     else:
   15155             :  */
   15156           0 :   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
   15157           0 :   if (__pyx_t_1) {
   15158             : 
   15159             :     /* "View.MemoryView":1028
   15160             :  * 
   15161             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   15162             :  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
   15163             :  *     else:
   15164             :  *         result.flags = PyBUF_RECORDS_RO
   15165             :  */
   15166           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
   15167             : 
   15168             :     /* "View.MemoryView":1027
   15169             :  *     Py_INCREF(Py_None)
   15170             :  * 
   15171             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   15172             :  *         result.flags = PyBUF_RECORDS
   15173             :  *     else:
   15174             :  */
   15175           0 :     goto __pyx_L4;
   15176             :   }
   15177             : 
   15178             :   /* "View.MemoryView":1030
   15179             :  *         result.flags = PyBUF_RECORDS
   15180             :  *     else:
   15181             :  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
   15182             :  * 
   15183             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   15184             :  */
   15185             :   /*else*/ {
   15186           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
   15187             :   }
   15188           0 :   __pyx_L4:;
   15189             : 
   15190             :   /* "View.MemoryView":1032
   15191             :  *         result.flags = PyBUF_RECORDS_RO
   15192             :  * 
   15193             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
   15194             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
   15195             :  * 
   15196             :  */
   15197           0 :   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
   15198             : 
   15199             :   /* "View.MemoryView":1033
   15200             :  * 
   15201             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   15202             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
   15203             :  * 
   15204             :  * 
   15205             :  */
   15206           0 :   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
   15207             : 
   15208             :   /* "View.MemoryView":1036
   15209             :  * 
   15210             :  * 
   15211             :  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
   15212             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15213             :  *         if suboffset >= 0:
   15214             :  */
   15215           0 :   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
   15216             : 
   15217             :   /* "View.MemoryView":1037
   15218             :  * 
   15219             :  *     result.view.suboffsets = NULL
   15220             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   15221             :  *         if suboffset >= 0:
   15222             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15223             :  */
   15224           0 :   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
   15225           0 :   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15226           0 :     __pyx_t_6 = __pyx_t_8;
   15227           0 :     __pyx_v_suboffset = (__pyx_t_6[0]);
   15228             : 
   15229             :     /* "View.MemoryView":1038
   15230             :  *     result.view.suboffsets = NULL
   15231             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15232             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15233             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15234             :  *             break
   15235             :  */
   15236           0 :     __pyx_t_1 = (__pyx_v_suboffset >= 0);
   15237           0 :     if (__pyx_t_1) {
   15238             : 
   15239             :       /* "View.MemoryView":1039
   15240             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15241             :  *         if suboffset >= 0:
   15242             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
   15243             :  *             break
   15244             :  * 
   15245             :  */
   15246           0 :       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
   15247             : 
   15248             :       /* "View.MemoryView":1040
   15249             :  *         if suboffset >= 0:
   15250             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15251             :  *             break             # <<<<<<<<<<<<<<
   15252             :  * 
   15253             :  *     result.view.len = result.view.itemsize
   15254             :  */
   15255           0 :       goto __pyx_L6_break;
   15256             : 
   15257             :       /* "View.MemoryView":1038
   15258             :  *     result.view.suboffsets = NULL
   15259             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15260             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15261             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15262             :  *             break
   15263             :  */
   15264             :     }
   15265             :   }
   15266           0 :   __pyx_L6_break:;
   15267             : 
   15268             :   /* "View.MemoryView":1042
   15269             :  *             break
   15270             :  * 
   15271             :  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
   15272             :  *     for length in result.view.shape[:ndim]:
   15273             :  *         result.view.len *= length
   15274             :  */
   15275           0 :   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
   15276           0 :   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15277             : 
   15278             :   /* "View.MemoryView":1043
   15279             :  * 
   15280             :  *     result.view.len = result.view.itemsize
   15281             :  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
   15282             :  *         result.view.len *= length
   15283             :  * 
   15284             :  */
   15285           0 :   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
   15286           0 :   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15287           0 :     __pyx_t_6 = __pyx_t_8;
   15288           0 :     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
   15289           0 :     __Pyx_GOTREF(__pyx_t_2);
   15290           0 :     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
   15291           0 :     __pyx_t_2 = 0;
   15292             : 
   15293             :     /* "View.MemoryView":1044
   15294             :  *     result.view.len = result.view.itemsize
   15295             :  *     for length in result.view.shape[:ndim]:
   15296             :  *         result.view.len *= length             # <<<<<<<<<<<<<<
   15297             :  * 
   15298             :  *     result.to_object_func = to_object_func
   15299             :  */
   15300           0 :     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15301           0 :     __Pyx_GOTREF(__pyx_t_2);
   15302           0 :     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15303           0 :     __Pyx_GOTREF(__pyx_t_3);
   15304           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   15305           0 :     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
   15306           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15307           0 :     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15308             :   }
   15309             : 
   15310             :   /* "View.MemoryView":1046
   15311             :  *         result.view.len *= length
   15312             :  * 
   15313             :  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
   15314             :  *     result.to_dtype_func = to_dtype_func
   15315             :  * 
   15316             :  */
   15317           0 :   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
   15318             : 
   15319             :   /* "View.MemoryView":1047
   15320             :  * 
   15321             :  *     result.to_object_func = to_object_func
   15322             :  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
   15323             :  * 
   15324             :  *     return result
   15325             :  */
   15326           0 :   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
   15327             : 
   15328             :   /* "View.MemoryView":1049
   15329             :  *     result.to_dtype_func = to_dtype_func
   15330             :  * 
   15331             :  *     return result             # <<<<<<<<<<<<<<
   15332             :  * 
   15333             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15334             :  */
   15335           0 :   __Pyx_XDECREF(__pyx_r);
   15336           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   15337           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   15338           0 :   goto __pyx_L0;
   15339             : 
   15340             :   /* "View.MemoryView":999
   15341             :  * 
   15342             :  * @cname('__pyx_memoryview_fromslice')
   15343             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   15344             :  *                           int ndim,
   15345             :  *                           object (*to_object_func)(char *),
   15346             :  */
   15347             : 
   15348             :   /* function exit code */
   15349           0 :   __pyx_L1_error:;
   15350           0 :   __Pyx_XDECREF(__pyx_t_2);
   15351           0 :   __Pyx_XDECREF(__pyx_t_3);
   15352           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15353           0 :   __pyx_r = 0;
   15354           0 :   __pyx_L0:;
   15355           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   15356           0 :   __Pyx_XDECREF(__pyx_v_length);
   15357           0 :   __Pyx_XGIVEREF(__pyx_r);
   15358           0 :   __Pyx_RefNannyFinishContext();
   15359           0 :   return __pyx_r;
   15360             : }
   15361             : 
   15362             : /* "View.MemoryView":1052
   15363             :  * 
   15364             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15365             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15366             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15367             :  *     cdef _memoryviewslice obj
   15368             :  */
   15369             : 
   15370           0 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
   15371           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
   15372           0 :   __Pyx_memviewslice *__pyx_r;
   15373             :   __Pyx_RefNannyDeclarations
   15374           0 :   int __pyx_t_1;
   15375           0 :   PyObject *__pyx_t_2 = NULL;
   15376           0 :   int __pyx_lineno = 0;
   15377           0 :   const char *__pyx_filename = NULL;
   15378           0 :   int __pyx_clineno = 0;
   15379           0 :   __Pyx_RefNannySetupContext("get_slice_from_memview", 1);
   15380             : 
   15381             :   /* "View.MemoryView":1055
   15382             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15383             :  *     cdef _memoryviewslice obj
   15384             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15385             :  *         obj = memview
   15386             :  *         return &obj.from_slice
   15387             :  */
   15388           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15389           0 :   if (__pyx_t_1) {
   15390             : 
   15391             :     /* "View.MemoryView":1056
   15392             :  *     cdef _memoryviewslice obj
   15393             :  *     if isinstance(memview, _memoryviewslice):
   15394             :  *         obj = memview             # <<<<<<<<<<<<<<
   15395             :  *         return &obj.from_slice
   15396             :  *     else:
   15397             :  */
   15398           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
   15399           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   15400           0 :     __Pyx_INCREF(__pyx_t_2);
   15401           0 :     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15402           0 :     __pyx_t_2 = 0;
   15403             : 
   15404             :     /* "View.MemoryView":1057
   15405             :  *     if isinstance(memview, _memoryviewslice):
   15406             :  *         obj = memview
   15407             :  *         return &obj.from_slice             # <<<<<<<<<<<<<<
   15408             :  *     else:
   15409             :  *         slice_copy(memview, mslice)
   15410             :  */
   15411           0 :     __pyx_r = (&__pyx_v_obj->from_slice);
   15412           0 :     goto __pyx_L0;
   15413             : 
   15414             :     /* "View.MemoryView":1055
   15415             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15416             :  *     cdef _memoryviewslice obj
   15417             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15418             :  *         obj = memview
   15419             :  *         return &obj.from_slice
   15420             :  */
   15421             :   }
   15422             : 
   15423             :   /* "View.MemoryView":1059
   15424             :  *         return &obj.from_slice
   15425             :  *     else:
   15426             :  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
   15427             :  *         return mslice
   15428             :  * 
   15429             :  */
   15430             :   /*else*/ {
   15431           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
   15432             : 
   15433             :     /* "View.MemoryView":1060
   15434             :  *     else:
   15435             :  *         slice_copy(memview, mslice)
   15436             :  *         return mslice             # <<<<<<<<<<<<<<
   15437             :  * 
   15438             :  * @cname('__pyx_memoryview_slice_copy')
   15439             :  */
   15440           0 :     __pyx_r = __pyx_v_mslice;
   15441           0 :     goto __pyx_L0;
   15442             :   }
   15443             : 
   15444             :   /* "View.MemoryView":1052
   15445             :  * 
   15446             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15447             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15448             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15449             :  *     cdef _memoryviewslice obj
   15450             :  */
   15451             : 
   15452             :   /* function exit code */
   15453           0 :   __pyx_L1_error:;
   15454           0 :   __Pyx_XDECREF(__pyx_t_2);
   15455           0 :   __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15456           0 :   __pyx_r = NULL;
   15457           0 :   __pyx_L0:;
   15458           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
   15459           0 :   __Pyx_RefNannyFinishContext();
   15460           0 :   return __pyx_r;
   15461             : }
   15462             : 
   15463             : /* "View.MemoryView":1063
   15464             :  * 
   15465             :  * @cname('__pyx_memoryview_slice_copy')
   15466             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15467             :  *     cdef int dim
   15468             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15469             :  */
   15470             : 
   15471           0 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
   15472           0 :   int __pyx_v_dim;
   15473           0 :   Py_ssize_t *__pyx_v_shape;
   15474           0 :   Py_ssize_t *__pyx_v_strides;
   15475           0 :   Py_ssize_t *__pyx_v_suboffsets;
   15476           0 :   Py_ssize_t *__pyx_t_1;
   15477           0 :   int __pyx_t_2;
   15478           0 :   int __pyx_t_3;
   15479           0 :   int __pyx_t_4;
   15480           0 :   Py_ssize_t __pyx_t_5;
   15481           0 :   int __pyx_t_6;
   15482             : 
   15483             :   /* "View.MemoryView":1067
   15484             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15485             :  * 
   15486             :  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
   15487             :  *     strides = memview.view.strides
   15488             :  *     suboffsets = memview.view.suboffsets
   15489             :  */
   15490           0 :   __pyx_t_1 = __pyx_v_memview->view.shape;
   15491           0 :   __pyx_v_shape = __pyx_t_1;
   15492             : 
   15493             :   /* "View.MemoryView":1068
   15494             :  * 
   15495             :  *     shape = memview.view.shape
   15496             :  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
   15497             :  *     suboffsets = memview.view.suboffsets
   15498             :  * 
   15499             :  */
   15500           0 :   __pyx_t_1 = __pyx_v_memview->view.strides;
   15501           0 :   __pyx_v_strides = __pyx_t_1;
   15502             : 
   15503             :   /* "View.MemoryView":1069
   15504             :  *     shape = memview.view.shape
   15505             :  *     strides = memview.view.strides
   15506             :  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
   15507             :  * 
   15508             :  *     dst.memview = <__pyx_memoryview *> memview
   15509             :  */
   15510           0 :   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
   15511           0 :   __pyx_v_suboffsets = __pyx_t_1;
   15512             : 
   15513             :   /* "View.MemoryView":1071
   15514             :  *     suboffsets = memview.view.suboffsets
   15515             :  * 
   15516             :  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
   15517             :  *     dst.data = <char *> memview.view.buf
   15518             :  * 
   15519             :  */
   15520           0 :   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
   15521             : 
   15522             :   /* "View.MemoryView":1072
   15523             :  * 
   15524             :  *     dst.memview = <__pyx_memoryview *> memview
   15525             :  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
   15526             :  * 
   15527             :  *     for dim in range(memview.view.ndim):
   15528             :  */
   15529           0 :   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
   15530             : 
   15531             :   /* "View.MemoryView":1074
   15532             :  *     dst.data = <char *> memview.view.buf
   15533             :  * 
   15534             :  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
   15535             :  *         dst.shape[dim] = shape[dim]
   15536             :  *         dst.strides[dim] = strides[dim]
   15537             :  */
   15538           0 :   __pyx_t_2 = __pyx_v_memview->view.ndim;
   15539           0 :   __pyx_t_3 = __pyx_t_2;
   15540           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15541           0 :     __pyx_v_dim = __pyx_t_4;
   15542             : 
   15543             :     /* "View.MemoryView":1075
   15544             :  * 
   15545             :  *     for dim in range(memview.view.ndim):
   15546             :  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
   15547             :  *         dst.strides[dim] = strides[dim]
   15548             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15549             :  */
   15550           0 :     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
   15551             : 
   15552             :     /* "View.MemoryView":1076
   15553             :  *     for dim in range(memview.view.ndim):
   15554             :  *         dst.shape[dim] = shape[dim]
   15555             :  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
   15556             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15557             :  * 
   15558             :  */
   15559           0 :     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
   15560             : 
   15561             :     /* "View.MemoryView":1077
   15562             :  *         dst.shape[dim] = shape[dim]
   15563             :  *         dst.strides[dim] = strides[dim]
   15564             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
   15565             :  * 
   15566             :  * @cname('__pyx_memoryview_copy_object')
   15567             :  */
   15568           0 :     __pyx_t_6 = (__pyx_v_suboffsets != 0);
   15569           0 :     if (__pyx_t_6) {
   15570           0 :       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
   15571             :     } else {
   15572             :       __pyx_t_5 = -1L;
   15573             :     }
   15574           0 :     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
   15575             :   }
   15576             : 
   15577             :   /* "View.MemoryView":1063
   15578             :  * 
   15579             :  * @cname('__pyx_memoryview_slice_copy')
   15580             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15581             :  *     cdef int dim
   15582             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15583             :  */
   15584             : 
   15585             :   /* function exit code */
   15586           0 : }
   15587             : 
   15588             : /* "View.MemoryView":1080
   15589             :  * 
   15590             :  * @cname('__pyx_memoryview_copy_object')
   15591             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15592             :  *     "Create a new memoryview object"
   15593             :  *     cdef __Pyx_memviewslice memviewslice
   15594             :  */
   15595             : 
   15596           0 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
   15597           0 :   __Pyx_memviewslice __pyx_v_memviewslice;
   15598           0 :   PyObject *__pyx_r = NULL;
   15599             :   __Pyx_RefNannyDeclarations
   15600           0 :   PyObject *__pyx_t_1 = NULL;
   15601           0 :   int __pyx_lineno = 0;
   15602           0 :   const char *__pyx_filename = NULL;
   15603           0 :   int __pyx_clineno = 0;
   15604           0 :   __Pyx_RefNannySetupContext("memoryview_copy", 1);
   15605             : 
   15606             :   /* "View.MemoryView":1083
   15607             :  *     "Create a new memoryview object"
   15608             :  *     cdef __Pyx_memviewslice memviewslice
   15609             :  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15610             :  *     return memoryview_copy_from_slice(memview, &memviewslice)
   15611             :  * 
   15612             :  */
   15613           0 :   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
   15614             : 
   15615             :   /* "View.MemoryView":1084
   15616             :  *     cdef __Pyx_memviewslice memviewslice
   15617             :  *     slice_copy(memview, &memviewslice)
   15618             :  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15619             :  * 
   15620             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15621             :  */
   15622           0 :   __Pyx_XDECREF(__pyx_r);
   15623           0 :   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
   15624           0 :   __Pyx_GOTREF(__pyx_t_1);
   15625           0 :   __pyx_r = __pyx_t_1;
   15626           0 :   __pyx_t_1 = 0;
   15627           0 :   goto __pyx_L0;
   15628             : 
   15629             :   /* "View.MemoryView":1080
   15630             :  * 
   15631             :  * @cname('__pyx_memoryview_copy_object')
   15632             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15633             :  *     "Create a new memoryview object"
   15634             :  *     cdef __Pyx_memviewslice memviewslice
   15635             :  */
   15636             : 
   15637             :   /* function exit code */
   15638           0 :   __pyx_L1_error:;
   15639           0 :   __Pyx_XDECREF(__pyx_t_1);
   15640           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15641           0 :   __pyx_r = 0;
   15642           0 :   __pyx_L0:;
   15643           0 :   __Pyx_XGIVEREF(__pyx_r);
   15644           0 :   __Pyx_RefNannyFinishContext();
   15645           0 :   return __pyx_r;
   15646             : }
   15647             : 
   15648             : /* "View.MemoryView":1087
   15649             :  * 
   15650             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15651             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15652             :  *     """
   15653             :  *     Create a new memoryview object from a given memoryview object and slice.
   15654             :  */
   15655             : 
   15656           0 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
   15657           0 :   PyObject *(*__pyx_v_to_object_func)(char *);
   15658           0 :   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
   15659           0 :   PyObject *__pyx_r = NULL;
   15660             :   __Pyx_RefNannyDeclarations
   15661           0 :   int __pyx_t_1;
   15662           0 :   PyObject *(*__pyx_t_2)(char *);
   15663           0 :   int (*__pyx_t_3)(char *, PyObject *);
   15664           0 :   PyObject *__pyx_t_4 = NULL;
   15665           0 :   int __pyx_lineno = 0;
   15666           0 :   const char *__pyx_filename = NULL;
   15667           0 :   int __pyx_clineno = 0;
   15668           0 :   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);
   15669             : 
   15670             :   /* "View.MemoryView":1094
   15671             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15672             :  * 
   15673             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15674             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15675             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15676             :  */
   15677           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15678           0 :   if (__pyx_t_1) {
   15679             : 
   15680             :     /* "View.MemoryView":1095
   15681             :  * 
   15682             :  *     if isinstance(memview, _memoryviewslice):
   15683             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
   15684             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15685             :  *     else:
   15686             :  */
   15687           0 :     __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
   15688           0 :     __pyx_v_to_object_func = __pyx_t_2;
   15689             : 
   15690             :     /* "View.MemoryView":1096
   15691             :  *     if isinstance(memview, _memoryviewslice):
   15692             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15693             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
   15694             :  *     else:
   15695             :  *         to_object_func = NULL
   15696             :  */
   15697           0 :     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
   15698           0 :     __pyx_v_to_dtype_func = __pyx_t_3;
   15699             : 
   15700             :     /* "View.MemoryView":1094
   15701             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15702             :  * 
   15703             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15704             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15705             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15706             :  */
   15707           0 :     goto __pyx_L3;
   15708             :   }
   15709             : 
   15710             :   /* "View.MemoryView":1098
   15711             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15712             :  *     else:
   15713             :  *         to_object_func = NULL             # <<<<<<<<<<<<<<
   15714             :  *         to_dtype_func = NULL
   15715             :  * 
   15716             :  */
   15717             :   /*else*/ {
   15718             :     __pyx_v_to_object_func = NULL;
   15719             : 
   15720             :     /* "View.MemoryView":1099
   15721             :  *     else:
   15722             :  *         to_object_func = NULL
   15723             :  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
   15724             :  * 
   15725             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15726             :  */
   15727             :     __pyx_v_to_dtype_func = NULL;
   15728             :   }
   15729           0 :   __pyx_L3:;
   15730             : 
   15731             :   /* "View.MemoryView":1101
   15732             :  *         to_dtype_func = NULL
   15733             :  * 
   15734             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
   15735             :  *                                 to_object_func, to_dtype_func,
   15736             :  *                                 memview.dtype_is_object)
   15737             :  */
   15738           0 :   __Pyx_XDECREF(__pyx_r);
   15739             : 
   15740             :   /* "View.MemoryView":1103
   15741             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15742             :  *                                 to_object_func, to_dtype_func,
   15743             :  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
   15744             :  * 
   15745             :  * 
   15746             :  */
   15747           0 :   __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
   15748           0 :   __Pyx_GOTREF(__pyx_t_4);
   15749           0 :   __pyx_r = __pyx_t_4;
   15750           0 :   __pyx_t_4 = 0;
   15751           0 :   goto __pyx_L0;
   15752             : 
   15753             :   /* "View.MemoryView":1087
   15754             :  * 
   15755             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15756             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15757             :  *     """
   15758             :  *     Create a new memoryview object from a given memoryview object and slice.
   15759             :  */
   15760             : 
   15761             :   /* function exit code */
   15762           0 :   __pyx_L1_error:;
   15763           0 :   __Pyx_XDECREF(__pyx_t_4);
   15764           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15765           0 :   __pyx_r = 0;
   15766           0 :   __pyx_L0:;
   15767           0 :   __Pyx_XGIVEREF(__pyx_r);
   15768           0 :   __Pyx_RefNannyFinishContext();
   15769           0 :   return __pyx_r;
   15770             : }
   15771             : 
   15772             : /* "View.MemoryView":1109
   15773             :  * 
   15774             :  * 
   15775             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15776             :  *     return -arg if arg < 0 else arg
   15777             :  * 
   15778             :  */
   15779             : 
   15780           0 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
   15781           0 :   Py_ssize_t __pyx_r;
   15782           0 :   Py_ssize_t __pyx_t_1;
   15783           0 :   int __pyx_t_2;
   15784             : 
   15785             :   /* "View.MemoryView":1110
   15786             :  * 
   15787             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
   15788             :  *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
   15789             :  * 
   15790             :  * @cname('__pyx_get_best_slice_order')
   15791             :  */
   15792           0 :   __pyx_t_2 = (__pyx_v_arg < 0);
   15793           0 :   if (__pyx_t_2) {
   15794             :     __pyx_t_1 = (-__pyx_v_arg);
   15795             :   } else {
   15796             :     __pyx_t_1 = __pyx_v_arg;
   15797             :   }
   15798           0 :   __pyx_r = __pyx_t_1;
   15799           0 :   goto __pyx_L0;
   15800             : 
   15801             :   /* "View.MemoryView":1109
   15802             :  * 
   15803             :  * 
   15804             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15805             :  *     return -arg if arg < 0 else arg
   15806             :  * 
   15807             :  */
   15808             : 
   15809             :   /* function exit code */
   15810           0 :   __pyx_L0:;
   15811           0 :   return __pyx_r;
   15812             : }
   15813             : 
   15814             : /* "View.MemoryView":1113
   15815             :  * 
   15816             :  * @cname('__pyx_get_best_slice_order')
   15817             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15818             :  *     """
   15819             :  *     Figure out the best memory access order for a given slice.
   15820             :  */
   15821             : 
   15822           0 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
   15823           0 :   int __pyx_v_i;
   15824           0 :   Py_ssize_t __pyx_v_c_stride;
   15825           0 :   Py_ssize_t __pyx_v_f_stride;
   15826           0 :   char __pyx_r;
   15827           0 :   int __pyx_t_1;
   15828           0 :   int __pyx_t_2;
   15829           0 :   int __pyx_t_3;
   15830           0 :   int __pyx_t_4;
   15831             : 
   15832             :   /* "View.MemoryView":1118
   15833             :  *     """
   15834             :  *     cdef int i
   15835             :  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
   15836             :  *     cdef Py_ssize_t f_stride = 0
   15837             :  * 
   15838             :  */
   15839           0 :   __pyx_v_c_stride = 0;
   15840             : 
   15841             :   /* "View.MemoryView":1119
   15842             :  *     cdef int i
   15843             :  *     cdef Py_ssize_t c_stride = 0
   15844             :  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
   15845             :  * 
   15846             :  *     for i in range(ndim - 1, -1, -1):
   15847             :  */
   15848           0 :   __pyx_v_f_stride = 0;
   15849             : 
   15850             :   /* "View.MemoryView":1121
   15851             :  *     cdef Py_ssize_t f_stride = 0
   15852             :  * 
   15853             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   15854             :  *         if mslice.shape[i] > 1:
   15855             :  *             c_stride = mslice.strides[i]
   15856             :  */
   15857           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   15858           0 :     __pyx_v_i = __pyx_t_1;
   15859             : 
   15860             :     /* "View.MemoryView":1122
   15861             :  * 
   15862             :  *     for i in range(ndim - 1, -1, -1):
   15863             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15864             :  *             c_stride = mslice.strides[i]
   15865             :  *             break
   15866             :  */
   15867           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15868           0 :     if (__pyx_t_2) {
   15869             : 
   15870             :       /* "View.MemoryView":1123
   15871             :  *     for i in range(ndim - 1, -1, -1):
   15872             :  *         if mslice.shape[i] > 1:
   15873             :  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15874             :  *             break
   15875             :  * 
   15876             :  */
   15877           0 :       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15878             : 
   15879             :       /* "View.MemoryView":1124
   15880             :  *         if mslice.shape[i] > 1:
   15881             :  *             c_stride = mslice.strides[i]
   15882             :  *             break             # <<<<<<<<<<<<<<
   15883             :  * 
   15884             :  *     for i in range(ndim):
   15885             :  */
   15886           0 :       goto __pyx_L4_break;
   15887             : 
   15888             :       /* "View.MemoryView":1122
   15889             :  * 
   15890             :  *     for i in range(ndim - 1, -1, -1):
   15891             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15892             :  *             c_stride = mslice.strides[i]
   15893             :  *             break
   15894             :  */
   15895             :     }
   15896             :   }
   15897           0 :   __pyx_L4_break:;
   15898             : 
   15899             :   /* "View.MemoryView":1126
   15900             :  *             break
   15901             :  * 
   15902             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   15903             :  *         if mslice.shape[i] > 1:
   15904             :  *             f_stride = mslice.strides[i]
   15905             :  */
   15906           0 :   __pyx_t_1 = __pyx_v_ndim;
   15907           0 :   __pyx_t_3 = __pyx_t_1;
   15908           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15909           0 :     __pyx_v_i = __pyx_t_4;
   15910             : 
   15911             :     /* "View.MemoryView":1127
   15912             :  * 
   15913             :  *     for i in range(ndim):
   15914             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15915             :  *             f_stride = mslice.strides[i]
   15916             :  *             break
   15917             :  */
   15918           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15919           0 :     if (__pyx_t_2) {
   15920             : 
   15921             :       /* "View.MemoryView":1128
   15922             :  *     for i in range(ndim):
   15923             :  *         if mslice.shape[i] > 1:
   15924             :  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15925             :  *             break
   15926             :  * 
   15927             :  */
   15928           0 :       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15929             : 
   15930             :       /* "View.MemoryView":1129
   15931             :  *         if mslice.shape[i] > 1:
   15932             :  *             f_stride = mslice.strides[i]
   15933             :  *             break             # <<<<<<<<<<<<<<
   15934             :  * 
   15935             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15936             :  */
   15937           0 :       goto __pyx_L7_break;
   15938             : 
   15939             :       /* "View.MemoryView":1127
   15940             :  * 
   15941             :  *     for i in range(ndim):
   15942             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15943             :  *             f_stride = mslice.strides[i]
   15944             :  *             break
   15945             :  */
   15946             :     }
   15947             :   }
   15948           0 :   __pyx_L7_break:;
   15949             : 
   15950             :   /* "View.MemoryView":1131
   15951             :  *             break
   15952             :  * 
   15953             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15954             :  *         return 'C'
   15955             :  *     else:
   15956             :  */
   15957           0 :   __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
   15958           0 :   if (__pyx_t_2) {
   15959             : 
   15960             :     /* "View.MemoryView":1132
   15961             :  * 
   15962             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15963             :  *         return 'C'             # <<<<<<<<<<<<<<
   15964             :  *     else:
   15965             :  *         return 'F'
   15966             :  */
   15967           0 :     __pyx_r = 'C';
   15968           0 :     goto __pyx_L0;
   15969             : 
   15970             :     /* "View.MemoryView":1131
   15971             :  *             break
   15972             :  * 
   15973             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15974             :  *         return 'C'
   15975             :  *     else:
   15976             :  */
   15977             :   }
   15978             : 
   15979             :   /* "View.MemoryView":1134
   15980             :  *         return 'C'
   15981             :  *     else:
   15982             :  *         return 'F'             # <<<<<<<<<<<<<<
   15983             :  * 
   15984             :  * @cython.cdivision(True)
   15985             :  */
   15986             :   /*else*/ {
   15987           0 :     __pyx_r = 'F';
   15988           0 :     goto __pyx_L0;
   15989             :   }
   15990             : 
   15991             :   /* "View.MemoryView":1113
   15992             :  * 
   15993             :  * @cname('__pyx_get_best_slice_order')
   15994             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15995             :  *     """
   15996             :  *     Figure out the best memory access order for a given slice.
   15997             :  */
   15998             : 
   15999             :   /* function exit code */
   16000           0 :   __pyx_L0:;
   16001           0 :   return __pyx_r;
   16002             : }
   16003             : 
   16004             : /* "View.MemoryView":1137
   16005             :  * 
   16006             :  * @cython.cdivision(True)
   16007             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16008             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16009             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16010             :  */
   16011             : 
   16012           0 : static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16013           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   16014           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
   16015           0 :   Py_ssize_t __pyx_v_dst_extent;
   16016           0 :   Py_ssize_t __pyx_v_src_stride;
   16017           0 :   Py_ssize_t __pyx_v_dst_stride;
   16018           0 :   int __pyx_t_1;
   16019           0 :   int __pyx_t_2;
   16020           0 :   Py_ssize_t __pyx_t_3;
   16021           0 :   Py_ssize_t __pyx_t_4;
   16022           0 :   Py_ssize_t __pyx_t_5;
   16023             : 
   16024             :   /* "View.MemoryView":1144
   16025             :  * 
   16026             :  *     cdef Py_ssize_t i
   16027             :  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
   16028             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16029             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16030             :  */
   16031           0 :   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
   16032             : 
   16033             :   /* "View.MemoryView":1145
   16034             :  *     cdef Py_ssize_t i
   16035             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   16036             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
   16037             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16038             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16039             :  */
   16040           0 :   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
   16041             : 
   16042             :   /* "View.MemoryView":1146
   16043             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   16044             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16045             :  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
   16046             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16047             :  * 
   16048             :  */
   16049           0 :   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
   16050             : 
   16051             :   /* "View.MemoryView":1147
   16052             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16053             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16054             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
   16055             :  * 
   16056             :  *     if ndim == 1:
   16057             :  */
   16058           0 :   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
   16059             : 
   16060             :   /* "View.MemoryView":1149
   16061             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16062             :  * 
   16063             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   16064             :  *         if (src_stride > 0 and dst_stride > 0 and
   16065             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16066             :  */
   16067           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   16068           0 :   if (__pyx_t_1) {
   16069             : 
   16070             :     /* "View.MemoryView":1150
   16071             :  * 
   16072             :  *     if ndim == 1:
   16073             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16074             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16075             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16076             :  */
   16077           0 :     __pyx_t_2 = (__pyx_v_src_stride > 0);
   16078           0 :     if (__pyx_t_2) {
   16079           0 :     } else {
   16080           0 :       __pyx_t_1 = __pyx_t_2;
   16081           0 :       goto __pyx_L5_bool_binop_done;
   16082             :     }
   16083           0 :     __pyx_t_2 = (__pyx_v_dst_stride > 0);
   16084           0 :     if (__pyx_t_2) {
   16085           0 :     } else {
   16086           0 :       __pyx_t_1 = __pyx_t_2;
   16087           0 :       goto __pyx_L5_bool_binop_done;
   16088             :     }
   16089             : 
   16090             :     /* "View.MemoryView":1151
   16091             :  *     if ndim == 1:
   16092             :  *         if (src_stride > 0 and dst_stride > 0 and
   16093             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
   16094             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16095             :  *         else:
   16096             :  */
   16097           0 :     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
   16098           0 :     if (__pyx_t_2) {
   16099           0 :       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
   16100             :     }
   16101             :     __pyx_t_1 = __pyx_t_2;
   16102           0 :     __pyx_L5_bool_binop_done:;
   16103             : 
   16104             :     /* "View.MemoryView":1150
   16105             :  * 
   16106             :  *     if ndim == 1:
   16107             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16108             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16109             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16110             :  */
   16111           0 :     if (__pyx_t_1) {
   16112             : 
   16113             :       /* "View.MemoryView":1152
   16114             :  *         if (src_stride > 0 and dst_stride > 0 and
   16115             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16116             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
   16117             :  *         else:
   16118             :  *             for i in range(dst_extent):
   16119             :  */
   16120           0 :       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
   16121             : 
   16122             :       /* "View.MemoryView":1150
   16123             :  * 
   16124             :  *     if ndim == 1:
   16125             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16126             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16127             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16128             :  */
   16129           0 :       goto __pyx_L4;
   16130             :     }
   16131             : 
   16132             :     /* "View.MemoryView":1154
   16133             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16134             :  *         else:
   16135             :  *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
   16136             :  *                 memcpy(dst_data, src_data, itemsize)
   16137             :  *                 src_data += src_stride
   16138             :  */
   16139             :     /*else*/ {
   16140             :       __pyx_t_3 = __pyx_v_dst_extent;
   16141             :       __pyx_t_4 = __pyx_t_3;
   16142           0 :       for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   16143           0 :         __pyx_v_i = __pyx_t_5;
   16144             : 
   16145             :         /* "View.MemoryView":1155
   16146             :  *         else:
   16147             :  *             for i in range(dst_extent):
   16148             :  *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
   16149             :  *                 src_data += src_stride
   16150             :  *                 dst_data += dst_stride
   16151             :  */
   16152           0 :         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
   16153             : 
   16154             :         /* "View.MemoryView":1156
   16155             :  *             for i in range(dst_extent):
   16156             :  *                 memcpy(dst_data, src_data, itemsize)
   16157             :  *                 src_data += src_stride             # <<<<<<<<<<<<<<
   16158             :  *                 dst_data += dst_stride
   16159             :  *     else:
   16160             :  */
   16161           0 :         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16162             : 
   16163             :         /* "View.MemoryView":1157
   16164             :  *                 memcpy(dst_data, src_data, itemsize)
   16165             :  *                 src_data += src_stride
   16166             :  *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
   16167             :  *     else:
   16168             :  *         for i in range(dst_extent):
   16169             :  */
   16170           0 :         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16171             :       }
   16172             :     }
   16173           0 :     __pyx_L4:;
   16174             : 
   16175             :     /* "View.MemoryView":1149
   16176             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16177             :  * 
   16178             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   16179             :  *         if (src_stride > 0 and dst_stride > 0 and
   16180             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16181             :  */
   16182           0 :     goto __pyx_L3;
   16183             :   }
   16184             : 
   16185             :   /* "View.MemoryView":1159
   16186             :  *                 dst_data += dst_stride
   16187             :  *     else:
   16188             :  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
   16189             :  *             _copy_strided_to_strided(src_data, src_strides + 1,
   16190             :  *                                      dst_data, dst_strides + 1,
   16191             :  */
   16192             :   /*else*/ {
   16193             :     __pyx_t_3 = __pyx_v_dst_extent;
   16194             :     __pyx_t_4 = __pyx_t_3;
   16195           0 :     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   16196           0 :       __pyx_v_i = __pyx_t_5;
   16197             : 
   16198             :       /* "View.MemoryView":1160
   16199             :  *     else:
   16200             :  *         for i in range(dst_extent):
   16201             :  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
   16202             :  *                                      dst_data, dst_strides + 1,
   16203             :  *                                      src_shape + 1, dst_shape + 1,
   16204             :  */
   16205           0 :       _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
   16206             : 
   16207             :       /* "View.MemoryView":1164
   16208             :  *                                      src_shape + 1, dst_shape + 1,
   16209             :  *                                      ndim - 1, itemsize)
   16210             :  *             src_data += src_stride             # <<<<<<<<<<<<<<
   16211             :  *             dst_data += dst_stride
   16212             :  * 
   16213             :  */
   16214           0 :       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16215             : 
   16216             :       /* "View.MemoryView":1165
   16217             :  *                                      ndim - 1, itemsize)
   16218             :  *             src_data += src_stride
   16219             :  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
   16220             :  * 
   16221             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
   16222             :  */
   16223           0 :       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16224             :     }
   16225             :   }
   16226           0 :   __pyx_L3:;
   16227             : 
   16228             :   /* "View.MemoryView":1137
   16229             :  * 
   16230             :  * @cython.cdivision(True)
   16231             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16232             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16233             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16234             :  */
   16235             : 
   16236             :   /* function exit code */
   16237           0 : }
   16238             : 
   16239             : /* "View.MemoryView":1167
   16240             :  *             dst_data += dst_stride
   16241             :  * 
   16242             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16243             :  *                                   __Pyx_memviewslice *dst,
   16244             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16245             :  */
   16246             : 
   16247           0 : static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16248             : 
   16249             :   /* "View.MemoryView":1170
   16250             :  *                                   __Pyx_memviewslice *dst,
   16251             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16252             :  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
   16253             :  *                              src.shape, dst.shape, ndim, itemsize)
   16254             :  * 
   16255             :  */
   16256           0 :   _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
   16257             : 
   16258             :   /* "View.MemoryView":1167
   16259             :  *             dst_data += dst_stride
   16260             :  * 
   16261             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16262             :  *                                   __Pyx_memviewslice *dst,
   16263             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16264             :  */
   16265             : 
   16266             :   /* function exit code */
   16267           0 : }
   16268             : 
   16269             : /* "View.MemoryView":1174
   16270             :  * 
   16271             :  * @cname('__pyx_memoryview_slice_get_size')
   16272             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16273             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16274             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16275             :  */
   16276             : 
   16277           0 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
   16278           0 :   Py_ssize_t __pyx_v_shape;
   16279           0 :   Py_ssize_t __pyx_v_size;
   16280           0 :   Py_ssize_t __pyx_r;
   16281           0 :   Py_ssize_t __pyx_t_1;
   16282           0 :   Py_ssize_t *__pyx_t_2;
   16283           0 :   Py_ssize_t *__pyx_t_3;
   16284           0 :   Py_ssize_t *__pyx_t_4;
   16285             : 
   16286             :   /* "View.MemoryView":1176
   16287             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
   16288             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16289             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16290             :  * 
   16291             :  *     for shape in src.shape[:ndim]:
   16292             :  */
   16293           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16294           0 :   __pyx_v_size = __pyx_t_1;
   16295             : 
   16296             :   /* "View.MemoryView":1178
   16297             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16298             :  * 
   16299             :  *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
   16300             :  *         size *= shape
   16301             :  * 
   16302             :  */
   16303           0 :   __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
   16304           0 :   for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   16305           0 :     __pyx_t_2 = __pyx_t_4;
   16306           0 :     __pyx_v_shape = (__pyx_t_2[0]);
   16307             : 
   16308             :     /* "View.MemoryView":1179
   16309             :  * 
   16310             :  *     for shape in src.shape[:ndim]:
   16311             :  *         size *= shape             # <<<<<<<<<<<<<<
   16312             :  * 
   16313             :  *     return size
   16314             :  */
   16315           0 :     __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
   16316             :   }
   16317             : 
   16318             :   /* "View.MemoryView":1181
   16319             :  *         size *= shape
   16320             :  * 
   16321             :  *     return size             # <<<<<<<<<<<<<<
   16322             :  * 
   16323             :  * @cname('__pyx_fill_contig_strides_array')
   16324             :  */
   16325           0 :   __pyx_r = __pyx_v_size;
   16326           0 :   goto __pyx_L0;
   16327             : 
   16328             :   /* "View.MemoryView":1174
   16329             :  * 
   16330             :  * @cname('__pyx_memoryview_slice_get_size')
   16331             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16332             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16333             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16334             :  */
   16335             : 
   16336             :   /* function exit code */
   16337           0 :   __pyx_L0:;
   16338           0 :   return __pyx_r;
   16339             : }
   16340             : 
   16341             : /* "View.MemoryView":1184
   16342             :  * 
   16343             :  * @cname('__pyx_fill_contig_strides_array')
   16344             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16345             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16346             :  *                 int ndim, char order) noexcept nogil:
   16347             :  */
   16348             : 
   16349           0 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
   16350           0 :   int __pyx_v_idx;
   16351           0 :   Py_ssize_t __pyx_r;
   16352           0 :   int __pyx_t_1;
   16353           0 :   int __pyx_t_2;
   16354           0 :   int __pyx_t_3;
   16355           0 :   int __pyx_t_4;
   16356             : 
   16357             :   /* "View.MemoryView":1193
   16358             :  *     cdef int idx
   16359             :  * 
   16360             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16361             :  *         for idx in range(ndim):
   16362             :  *             strides[idx] = stride
   16363             :  */
   16364           0 :   __pyx_t_1 = (__pyx_v_order == 'F');
   16365           0 :   if (__pyx_t_1) {
   16366             : 
   16367             :     /* "View.MemoryView":1194
   16368             :  * 
   16369             :  *     if order == 'F':
   16370             :  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
   16371             :  *             strides[idx] = stride
   16372             :  *             stride *= shape[idx]
   16373             :  */
   16374           0 :     __pyx_t_2 = __pyx_v_ndim;
   16375             :     __pyx_t_3 = __pyx_t_2;
   16376           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16377           0 :       __pyx_v_idx = __pyx_t_4;
   16378             : 
   16379             :       /* "View.MemoryView":1195
   16380             :  *     if order == 'F':
   16381             :  *         for idx in range(ndim):
   16382             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16383             :  *             stride *= shape[idx]
   16384             :  *     else:
   16385             :  */
   16386           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16387             : 
   16388             :       /* "View.MemoryView":1196
   16389             :  *         for idx in range(ndim):
   16390             :  *             strides[idx] = stride
   16391             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16392             :  *     else:
   16393             :  *         for idx in range(ndim - 1, -1, -1):
   16394             :  */
   16395           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16396             :     }
   16397             : 
   16398             :     /* "View.MemoryView":1193
   16399             :  *     cdef int idx
   16400             :  * 
   16401             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16402             :  *         for idx in range(ndim):
   16403             :  *             strides[idx] = stride
   16404             :  */
   16405           0 :     goto __pyx_L3;
   16406             :   }
   16407             : 
   16408             :   /* "View.MemoryView":1198
   16409             :  *             stride *= shape[idx]
   16410             :  *     else:
   16411             :  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   16412             :  *             strides[idx] = stride
   16413             :  *             stride *= shape[idx]
   16414             :  */
   16415             :   /*else*/ {
   16416           0 :     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
   16417           0 :       __pyx_v_idx = __pyx_t_2;
   16418             : 
   16419             :       /* "View.MemoryView":1199
   16420             :  *     else:
   16421             :  *         for idx in range(ndim - 1, -1, -1):
   16422             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16423             :  *             stride *= shape[idx]
   16424             :  * 
   16425             :  */
   16426           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16427             : 
   16428             :       /* "View.MemoryView":1200
   16429             :  *         for idx in range(ndim - 1, -1, -1):
   16430             :  *             strides[idx] = stride
   16431             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16432             :  * 
   16433             :  *     return stride
   16434             :  */
   16435           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16436             :     }
   16437             :   }
   16438           0 :   __pyx_L3:;
   16439             : 
   16440             :   /* "View.MemoryView":1202
   16441             :  *             stride *= shape[idx]
   16442             :  * 
   16443             :  *     return stride             # <<<<<<<<<<<<<<
   16444             :  * 
   16445             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16446             :  */
   16447           0 :   __pyx_r = __pyx_v_stride;
   16448           0 :   goto __pyx_L0;
   16449             : 
   16450             :   /* "View.MemoryView":1184
   16451             :  * 
   16452             :  * @cname('__pyx_fill_contig_strides_array')
   16453             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16454             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16455             :  *                 int ndim, char order) noexcept nogil:
   16456             :  */
   16457             : 
   16458             :   /* function exit code */
   16459           0 :   __pyx_L0:;
   16460           0 :   return __pyx_r;
   16461             : }
   16462             : 
   16463             : /* "View.MemoryView":1205
   16464             :  * 
   16465             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16466             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16467             :  *                              __Pyx_memviewslice *tmpslice,
   16468             :  *                              char order,
   16469             :  */
   16470             : 
   16471           0 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
   16472           0 :   int __pyx_v_i;
   16473           0 :   void *__pyx_v_result;
   16474           0 :   size_t __pyx_v_itemsize;
   16475           0 :   size_t __pyx_v_size;
   16476           0 :   void *__pyx_r;
   16477           0 :   Py_ssize_t __pyx_t_1;
   16478           0 :   int __pyx_t_2;
   16479           0 :   int __pyx_t_3;
   16480           0 :   struct __pyx_memoryview_obj *__pyx_t_4;
   16481           0 :   int __pyx_t_5;
   16482           0 :   int __pyx_t_6;
   16483           0 :   int __pyx_lineno = 0;
   16484           0 :   const char *__pyx_filename = NULL;
   16485           0 :   int __pyx_clineno = 0;
   16486             :   #ifdef WITH_THREAD
   16487           0 :   PyGILState_STATE __pyx_gilstate_save;
   16488             :   #endif
   16489             : 
   16490             :   /* "View.MemoryView":1216
   16491             :  *     cdef void *result
   16492             :  * 
   16493             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16494             :  *     cdef size_t size = slice_get_size(src, ndim)
   16495             :  * 
   16496             :  */
   16497           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16498           0 :   __pyx_v_itemsize = __pyx_t_1;
   16499             : 
   16500             :   /* "View.MemoryView":1217
   16501             :  * 
   16502             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16503             :  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
   16504             :  * 
   16505             :  *     result = malloc(size)
   16506             :  */
   16507           0 :   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
   16508             : 
   16509             :   /* "View.MemoryView":1219
   16510             :  *     cdef size_t size = slice_get_size(src, ndim)
   16511             :  * 
   16512             :  *     result = malloc(size)             # <<<<<<<<<<<<<<
   16513             :  *     if not result:
   16514             :  *         _err_no_memory()
   16515             :  */
   16516           0 :   __pyx_v_result = malloc(__pyx_v_size);
   16517             : 
   16518             :   /* "View.MemoryView":1220
   16519             :  * 
   16520             :  *     result = malloc(size)
   16521             :  *     if not result:             # <<<<<<<<<<<<<<
   16522             :  *         _err_no_memory()
   16523             :  * 
   16524             :  */
   16525           0 :   __pyx_t_2 = (!(__pyx_v_result != 0));
   16526           0 :   if (__pyx_t_2) {
   16527             : 
   16528             :     /* "View.MemoryView":1221
   16529             :  *     result = malloc(size)
   16530             :  *     if not result:
   16531             :  *         _err_no_memory()             # <<<<<<<<<<<<<<
   16532             :  * 
   16533             :  * 
   16534             :  */
   16535           0 :     __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
   16536             : 
   16537             :     /* "View.MemoryView":1220
   16538             :  * 
   16539             :  *     result = malloc(size)
   16540             :  *     if not result:             # <<<<<<<<<<<<<<
   16541             :  *         _err_no_memory()
   16542             :  * 
   16543             :  */
   16544             :   }
   16545             : 
   16546             :   /* "View.MemoryView":1224
   16547             :  * 
   16548             :  * 
   16549             :  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
   16550             :  *     tmpslice.memview = src.memview
   16551             :  *     for i in range(ndim):
   16552             :  */
   16553           0 :   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
   16554             : 
   16555             :   /* "View.MemoryView":1225
   16556             :  * 
   16557             :  *     tmpslice.data = <char *> result
   16558             :  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
   16559             :  *     for i in range(ndim):
   16560             :  *         tmpslice.shape[i] = src.shape[i]
   16561             :  */
   16562           0 :   __pyx_t_4 = __pyx_v_src->memview;
   16563           0 :   __pyx_v_tmpslice->memview = __pyx_t_4;
   16564             : 
   16565             :   /* "View.MemoryView":1226
   16566             :  *     tmpslice.data = <char *> result
   16567             :  *     tmpslice.memview = src.memview
   16568             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16569             :  *         tmpslice.shape[i] = src.shape[i]
   16570             :  *         tmpslice.suboffsets[i] = -1
   16571             :  */
   16572           0 :   __pyx_t_3 = __pyx_v_ndim;
   16573           0 :   __pyx_t_5 = __pyx_t_3;
   16574           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16575           0 :     __pyx_v_i = __pyx_t_6;
   16576             : 
   16577             :     /* "View.MemoryView":1227
   16578             :  *     tmpslice.memview = src.memview
   16579             :  *     for i in range(ndim):
   16580             :  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
   16581             :  *         tmpslice.suboffsets[i] = -1
   16582             :  * 
   16583             :  */
   16584           0 :     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
   16585             : 
   16586             :     /* "View.MemoryView":1228
   16587             :  *     for i in range(ndim):
   16588             :  *         tmpslice.shape[i] = src.shape[i]
   16589             :  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   16590             :  * 
   16591             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
   16592             :  */
   16593           0 :     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
   16594             :   }
   16595             : 
   16596             :   /* "View.MemoryView":1230
   16597             :  *         tmpslice.suboffsets[i] = -1
   16598             :  * 
   16599             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
   16600             :  * 
   16601             :  * 
   16602             :  */
   16603           0 :   (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
   16604             : 
   16605             :   /* "View.MemoryView":1233
   16606             :  * 
   16607             :  * 
   16608             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16609             :  *         if tmpslice.shape[i] == 1:
   16610             :  *             tmpslice.strides[i] = 0
   16611             :  */
   16612           0 :   __pyx_t_3 = __pyx_v_ndim;
   16613           0 :   __pyx_t_5 = __pyx_t_3;
   16614           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16615           0 :     __pyx_v_i = __pyx_t_6;
   16616             : 
   16617             :     /* "View.MemoryView":1234
   16618             :  * 
   16619             :  *     for i in range(ndim):
   16620             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16621             :  *             tmpslice.strides[i] = 0
   16622             :  * 
   16623             :  */
   16624           0 :     __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
   16625           0 :     if (__pyx_t_2) {
   16626             : 
   16627             :       /* "View.MemoryView":1235
   16628             :  *     for i in range(ndim):
   16629             :  *         if tmpslice.shape[i] == 1:
   16630             :  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
   16631             :  * 
   16632             :  *     if slice_is_contig(src[0], order, ndim):
   16633             :  */
   16634           0 :       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
   16635             : 
   16636             :       /* "View.MemoryView":1234
   16637             :  * 
   16638             :  *     for i in range(ndim):
   16639             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16640             :  *             tmpslice.strides[i] = 0
   16641             :  * 
   16642             :  */
   16643             :     }
   16644             :   }
   16645             : 
   16646             :   /* "View.MemoryView":1237
   16647             :  *             tmpslice.strides[i] = 0
   16648             :  * 
   16649             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16650             :  *         memcpy(result, src.data, size)
   16651             :  *     else:
   16652             :  */
   16653           0 :   __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
   16654           0 :   if (__pyx_t_2) {
   16655             : 
   16656             :     /* "View.MemoryView":1238
   16657             :  * 
   16658             :  *     if slice_is_contig(src[0], order, ndim):
   16659             :  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
   16660             :  *     else:
   16661             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16662             :  */
   16663           0 :     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
   16664             : 
   16665             :     /* "View.MemoryView":1237
   16666             :  *             tmpslice.strides[i] = 0
   16667             :  * 
   16668             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16669             :  *         memcpy(result, src.data, size)
   16670             :  *     else:
   16671             :  */
   16672           0 :     goto __pyx_L9;
   16673             :   }
   16674             : 
   16675             :   /* "View.MemoryView":1240
   16676             :  *         memcpy(result, src.data, size)
   16677             :  *     else:
   16678             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
   16679             :  * 
   16680             :  *     return result
   16681             :  */
   16682             :   /*else*/ {
   16683           0 :     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
   16684             :   }
   16685           0 :   __pyx_L9:;
   16686             : 
   16687             :   /* "View.MemoryView":1242
   16688             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16689             :  * 
   16690             :  *     return result             # <<<<<<<<<<<<<<
   16691             :  * 
   16692             :  * 
   16693             :  */
   16694           0 :   __pyx_r = __pyx_v_result;
   16695           0 :   goto __pyx_L0;
   16696             : 
   16697             :   /* "View.MemoryView":1205
   16698             :  * 
   16699             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16700             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16701             :  *                              __Pyx_memviewslice *tmpslice,
   16702             :  *                              char order,
   16703             :  */
   16704             : 
   16705             :   /* function exit code */
   16706           0 :   __pyx_L1_error:;
   16707             :   #ifdef WITH_THREAD
   16708           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16709             :   #endif
   16710           0 :   __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16711           0 :   __pyx_r = NULL;
   16712             :   #ifdef WITH_THREAD
   16713           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16714             :   #endif
   16715           0 :   __pyx_L0:;
   16716           0 :   return __pyx_r;
   16717             : }
   16718             : 
   16719             : /* "View.MemoryView":1247
   16720             :  * 
   16721             :  * @cname('__pyx_memoryview_err_extents')
   16722             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16723             :  *                              Py_ssize_t extent2) except -1 with gil:
   16724             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16725             :  */
   16726             : 
   16727           0 : static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
   16728           0 :   int __pyx_r;
   16729             :   __Pyx_RefNannyDeclarations
   16730           0 :   PyObject *__pyx_t_1 = NULL;
   16731           0 :   Py_ssize_t __pyx_t_2;
   16732           0 :   Py_UCS4 __pyx_t_3;
   16733           0 :   PyObject *__pyx_t_4 = NULL;
   16734           0 :   int __pyx_lineno = 0;
   16735           0 :   const char *__pyx_filename = NULL;
   16736           0 :   int __pyx_clineno = 0;
   16737             :   #ifdef WITH_THREAD
   16738           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16739             :   #endif
   16740           0 :   __Pyx_RefNannySetupContext("_err_extents", 0);
   16741             : 
   16742             :   /* "View.MemoryView":1249
   16743             :  * cdef int _err_extents(int i, Py_ssize_t extent1,
   16744             :  *                              Py_ssize_t extent2) except -1 with gil:
   16745             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
   16746             :  * 
   16747             :  * @cname('__pyx_memoryview_err_dim')
   16748             :  */
   16749           0 :   __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16750           0 :   __Pyx_GOTREF(__pyx_t_1);
   16751           0 :   __pyx_t_2 = 0;
   16752           0 :   __pyx_t_3 = 127;
   16753           0 :   __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16754           0 :   __pyx_t_2 += 35;
   16755           0 :   __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16756           0 :   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
   16757           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16758           0 :   __Pyx_GOTREF(__pyx_t_4);
   16759           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16760           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16761           0 :   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
   16762           0 :   __pyx_t_4 = 0;
   16763           0 :   __Pyx_INCREF(__pyx_kp_u_got);
   16764           0 :   __pyx_t_2 += 6;
   16765           0 :   __Pyx_GIVEREF(__pyx_kp_u_got);
   16766           0 :   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
   16767           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16768           0 :   __Pyx_GOTREF(__pyx_t_4);
   16769           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16770           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16771           0 :   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
   16772           0 :   __pyx_t_4 = 0;
   16773           0 :   __Pyx_INCREF(__pyx_kp_u_and);
   16774           0 :   __pyx_t_2 += 5;
   16775           0 :   __Pyx_GIVEREF(__pyx_kp_u_and);
   16776           0 :   PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
   16777           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16778           0 :   __Pyx_GOTREF(__pyx_t_4);
   16779           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16780           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16781           0 :   PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
   16782           0 :   __pyx_t_4 = 0;
   16783           0 :   __Pyx_INCREF(__pyx_kp_u__7);
   16784           0 :   __pyx_t_2 += 1;
   16785           0 :   __Pyx_GIVEREF(__pyx_kp_u__7);
   16786           0 :   PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7);
   16787           0 :   __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16788           0 :   __Pyx_GOTREF(__pyx_t_4);
   16789           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16790           0 :   __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
   16791           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   16792           0 :   __PYX_ERR(1, 1249, __pyx_L1_error)
   16793             : 
   16794             :   /* "View.MemoryView":1247
   16795             :  * 
   16796             :  * @cname('__pyx_memoryview_err_extents')
   16797             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16798             :  *                              Py_ssize_t extent2) except -1 with gil:
   16799             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16800             :  */
   16801             : 
   16802             :   /* function exit code */
   16803           0 :   __pyx_L1_error:;
   16804           0 :   __Pyx_XDECREF(__pyx_t_1);
   16805           0 :   __Pyx_XDECREF(__pyx_t_4);
   16806           0 :   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16807           0 :   __pyx_r = -1;
   16808           0 :   __Pyx_RefNannyFinishContext();
   16809             :   #ifdef WITH_THREAD
   16810           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16811             :   #endif
   16812           0 :   return __pyx_r;
   16813             : }
   16814             : 
   16815             : /* "View.MemoryView":1252
   16816             :  * 
   16817             :  * @cname('__pyx_memoryview_err_dim')
   16818             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16819             :  *     raise <object>error, msg % dim
   16820             :  * 
   16821             :  */
   16822             : 
   16823           0 : static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
   16824           0 :   int __pyx_r;
   16825             :   __Pyx_RefNannyDeclarations
   16826           0 :   PyObject *__pyx_t_1 = NULL;
   16827           0 :   PyObject *__pyx_t_2 = NULL;
   16828           0 :   int __pyx_lineno = 0;
   16829           0 :   const char *__pyx_filename = NULL;
   16830           0 :   int __pyx_clineno = 0;
   16831             :   #ifdef WITH_THREAD
   16832           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16833             :   #endif
   16834           0 :   __Pyx_RefNannySetupContext("_err_dim", 0);
   16835           0 :   __Pyx_INCREF(__pyx_v_msg);
   16836             : 
   16837             :   /* "View.MemoryView":1253
   16838             :  * @cname('__pyx_memoryview_err_dim')
   16839             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
   16840             :  *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
   16841             :  * 
   16842             :  * @cname('__pyx_memoryview_err')
   16843             :  */
   16844           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16845           0 :   __Pyx_GOTREF(__pyx_t_1);
   16846           0 :   __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16847           0 :   __Pyx_GOTREF(__pyx_t_2);
   16848           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16849           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
   16850           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   16851           0 :   __PYX_ERR(1, 1253, __pyx_L1_error)
   16852             : 
   16853             :   /* "View.MemoryView":1252
   16854             :  * 
   16855             :  * @cname('__pyx_memoryview_err_dim')
   16856             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16857             :  *     raise <object>error, msg % dim
   16858             :  * 
   16859             :  */
   16860             : 
   16861             :   /* function exit code */
   16862           0 :   __pyx_L1_error:;
   16863           0 :   __Pyx_XDECREF(__pyx_t_1);
   16864           0 :   __Pyx_XDECREF(__pyx_t_2);
   16865           0 :   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16866           0 :   __pyx_r = -1;
   16867           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16868           0 :   __Pyx_RefNannyFinishContext();
   16869             :   #ifdef WITH_THREAD
   16870           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16871             :   #endif
   16872           0 :   return __pyx_r;
   16873             : }
   16874             : 
   16875             : /* "View.MemoryView":1256
   16876             :  * 
   16877             :  * @cname('__pyx_memoryview_err')
   16878             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16879             :  *     raise <object>error, msg
   16880             :  * 
   16881             :  */
   16882             : 
   16883           0 : static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
   16884           0 :   int __pyx_r;
   16885             :   __Pyx_RefNannyDeclarations
   16886           0 :   int __pyx_lineno = 0;
   16887           0 :   const char *__pyx_filename = NULL;
   16888           0 :   int __pyx_clineno = 0;
   16889             :   #ifdef WITH_THREAD
   16890           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16891             :   #endif
   16892           0 :   __Pyx_RefNannySetupContext("_err", 0);
   16893           0 :   __Pyx_INCREF(__pyx_v_msg);
   16894             : 
   16895             :   /* "View.MemoryView":1257
   16896             :  * @cname('__pyx_memoryview_err')
   16897             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:
   16898             :  *     raise <object>error, msg             # <<<<<<<<<<<<<<
   16899             :  * 
   16900             :  * @cname('__pyx_memoryview_err_no_memory')
   16901             :  */
   16902           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
   16903           0 :   __PYX_ERR(1, 1257, __pyx_L1_error)
   16904             : 
   16905             :   /* "View.MemoryView":1256
   16906             :  * 
   16907             :  * @cname('__pyx_memoryview_err')
   16908             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16909             :  *     raise <object>error, msg
   16910             :  * 
   16911             :  */
   16912             : 
   16913             :   /* function exit code */
   16914           0 :   __pyx_L1_error:;
   16915           0 :   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16916           0 :   __pyx_r = -1;
   16917           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16918           0 :   __Pyx_RefNannyFinishContext();
   16919             :   #ifdef WITH_THREAD
   16920           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16921             :   #endif
   16922           0 :   return __pyx_r;
   16923             : }
   16924             : 
   16925             : /* "View.MemoryView":1260
   16926             :  * 
   16927             :  * @cname('__pyx_memoryview_err_no_memory')
   16928             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16929             :  *     raise MemoryError
   16930             :  * 
   16931             :  */
   16932             : 
   16933           0 : static int __pyx_memoryview_err_no_memory(void) {
   16934           0 :   int __pyx_r;
   16935           0 :   int __pyx_lineno = 0;
   16936           0 :   const char *__pyx_filename = NULL;
   16937           0 :   int __pyx_clineno = 0;
   16938             :   #ifdef WITH_THREAD
   16939           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16940             :   #endif
   16941             : 
   16942             :   /* "View.MemoryView":1261
   16943             :  * @cname('__pyx_memoryview_err_no_memory')
   16944             :  * cdef int _err_no_memory() except -1 with gil:
   16945             :  *     raise MemoryError             # <<<<<<<<<<<<<<
   16946             :  * 
   16947             :  * 
   16948             :  */
   16949           0 :   PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)
   16950             : 
   16951             :   /* "View.MemoryView":1260
   16952             :  * 
   16953             :  * @cname('__pyx_memoryview_err_no_memory')
   16954             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16955             :  *     raise MemoryError
   16956             :  * 
   16957             :  */
   16958             : 
   16959             :   /* function exit code */
   16960           0 :   __pyx_L1_error:;
   16961           0 :   __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16962           0 :   __pyx_r = -1;
   16963             :   #ifdef WITH_THREAD
   16964           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16965             :   #endif
   16966           0 :   return __pyx_r;
   16967             : }
   16968             : 
   16969             : /* "View.MemoryView":1265
   16970             :  * 
   16971             :  * @cname('__pyx_memoryview_copy_contents')
   16972             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   16973             :  *                                   __Pyx_memviewslice dst,
   16974             :  *                                   int src_ndim, int dst_ndim,
   16975             :  */
   16976             : 
   16977           0 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
   16978           0 :   void *__pyx_v_tmpdata;
   16979           0 :   size_t __pyx_v_itemsize;
   16980           0 :   int __pyx_v_i;
   16981           0 :   char __pyx_v_order;
   16982           0 :   int __pyx_v_broadcasting;
   16983           0 :   int __pyx_v_direct_copy;
   16984           0 :   __Pyx_memviewslice __pyx_v_tmp;
   16985           0 :   int __pyx_v_ndim;
   16986           0 :   int __pyx_r;
   16987           0 :   Py_ssize_t __pyx_t_1;
   16988           0 :   int __pyx_t_2;
   16989           0 :   int __pyx_t_3;
   16990           0 :   int __pyx_t_4;
   16991           0 :   int __pyx_t_5;
   16992           0 :   int __pyx_t_6;
   16993           0 :   void *__pyx_t_7;
   16994           0 :   int __pyx_lineno = 0;
   16995           0 :   const char *__pyx_filename = NULL;
   16996           0 :   int __pyx_clineno = 0;
   16997             :   #ifdef WITH_THREAD
   16998           0 :   PyGILState_STATE __pyx_gilstate_save;
   16999             :   #endif
   17000             : 
   17001             :   /* "View.MemoryView":1273
   17002             :  *     Check for overlapping memory and verify the shapes.
   17003             :  *     """
   17004             :  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
   17005             :  *     cdef size_t itemsize = src.memview.view.itemsize
   17006             :  *     cdef int i
   17007             :  */
   17008           0 :   __pyx_v_tmpdata = NULL;
   17009             : 
   17010             :   /* "View.MemoryView":1274
   17011             :  *     """
   17012             :  *     cdef void *tmpdata = NULL
   17013             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   17014             :  *     cdef int i
   17015             :  *     cdef char order = get_best_order(&src, src_ndim)
   17016             :  */
   17017           0 :   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
   17018           0 :   __pyx_v_itemsize = __pyx_t_1;
   17019             : 
   17020             :   /* "View.MemoryView":1276
   17021             :  *     cdef size_t itemsize = src.memview.view.itemsize
   17022             :  *     cdef int i
   17023             :  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
   17024             :  *     cdef bint broadcasting = False
   17025             :  *     cdef bint direct_copy = False
   17026             :  */
   17027           0 :   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
   17028             : 
   17029             :   /* "View.MemoryView":1277
   17030             :  *     cdef int i
   17031             :  *     cdef char order = get_best_order(&src, src_ndim)
   17032             :  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
   17033             :  *     cdef bint direct_copy = False
   17034             :  *     cdef __Pyx_memviewslice tmp
   17035             :  */
   17036           0 :   __pyx_v_broadcasting = 0;
   17037             : 
   17038             :   /* "View.MemoryView":1278
   17039             :  *     cdef char order = get_best_order(&src, src_ndim)
   17040             :  *     cdef bint broadcasting = False
   17041             :  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
   17042             :  *     cdef __Pyx_memviewslice tmp
   17043             :  * 
   17044             :  */
   17045           0 :   __pyx_v_direct_copy = 0;
   17046             : 
   17047             :   /* "View.MemoryView":1281
   17048             :  *     cdef __Pyx_memviewslice tmp
   17049             :  * 
   17050             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   17051             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17052             :  *     elif dst_ndim < src_ndim:
   17053             :  */
   17054           0 :   __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
   17055           0 :   if (__pyx_t_2) {
   17056             : 
   17057             :     /* "View.MemoryView":1282
   17058             :  * 
   17059             :  *     if src_ndim < dst_ndim:
   17060             :  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   17061             :  *     elif dst_ndim < src_ndim:
   17062             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17063             :  */
   17064           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
   17065             : 
   17066             :     /* "View.MemoryView":1281
   17067             :  *     cdef __Pyx_memviewslice tmp
   17068             :  * 
   17069             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   17070             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17071             :  *     elif dst_ndim < src_ndim:
   17072             :  */
   17073           0 :     goto __pyx_L3;
   17074             :   }
   17075             : 
   17076             :   /* "View.MemoryView":1283
   17077             :  *     if src_ndim < dst_ndim:
   17078             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17079             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   17080             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17081             :  * 
   17082             :  */
   17083           0 :   __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
   17084           0 :   if (__pyx_t_2) {
   17085             : 
   17086             :     /* "View.MemoryView":1284
   17087             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17088             :  *     elif dst_ndim < src_ndim:
   17089             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
   17090             :  * 
   17091             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   17092             :  */
   17093           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
   17094             : 
   17095             :     /* "View.MemoryView":1283
   17096             :  *     if src_ndim < dst_ndim:
   17097             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17098             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   17099             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17100             :  * 
   17101             :  */
   17102             :   }
   17103           0 :   __pyx_L3:;
   17104             : 
   17105             :   /* "View.MemoryView":1286
   17106             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17107             :  * 
   17108             :  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   17109             :  * 
   17110             :  *     for i in range(ndim):
   17111             :  */
   17112           0 :   __pyx_t_3 = __pyx_v_dst_ndim;
   17113           0 :   __pyx_t_4 = __pyx_v_src_ndim;
   17114           0 :   __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
   17115           0 :   if (__pyx_t_2) {
   17116             :     __pyx_t_5 = __pyx_t_3;
   17117             :   } else {
   17118             :     __pyx_t_5 = __pyx_t_4;
   17119             :   }
   17120           0 :   __pyx_v_ndim = __pyx_t_5;
   17121             : 
   17122             :   /* "View.MemoryView":1288
   17123             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   17124             :  * 
   17125             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   17126             :  *         if src.shape[i] != dst.shape[i]:
   17127             :  *             if src.shape[i] == 1:
   17128             :  */
   17129           0 :   __pyx_t_5 = __pyx_v_ndim;
   17130           0 :   __pyx_t_3 = __pyx_t_5;
   17131           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17132           0 :     __pyx_v_i = __pyx_t_4;
   17133             : 
   17134             :     /* "View.MemoryView":1289
   17135             :  * 
   17136             :  *     for i in range(ndim):
   17137             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   17138             :  *             if src.shape[i] == 1:
   17139             :  *                 broadcasting = True
   17140             :  */
   17141           0 :     __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
   17142           0 :     if (__pyx_t_2) {
   17143             : 
   17144             :       /* "View.MemoryView":1290
   17145             :  *     for i in range(ndim):
   17146             :  *         if src.shape[i] != dst.shape[i]:
   17147             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   17148             :  *                 broadcasting = True
   17149             :  *                 src.strides[i] = 0
   17150             :  */
   17151           0 :       __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
   17152           0 :       if (__pyx_t_2) {
   17153             : 
   17154             :         /* "View.MemoryView":1291
   17155             :  *         if src.shape[i] != dst.shape[i]:
   17156             :  *             if src.shape[i] == 1:
   17157             :  *                 broadcasting = True             # <<<<<<<<<<<<<<
   17158             :  *                 src.strides[i] = 0
   17159             :  *             else:
   17160             :  */
   17161           0 :         __pyx_v_broadcasting = 1;
   17162             : 
   17163             :         /* "View.MemoryView":1292
   17164             :  *             if src.shape[i] == 1:
   17165             :  *                 broadcasting = True
   17166             :  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
   17167             :  *             else:
   17168             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17169             :  */
   17170           0 :         (__pyx_v_src.strides[__pyx_v_i]) = 0;
   17171             : 
   17172             :         /* "View.MemoryView":1290
   17173             :  *     for i in range(ndim):
   17174             :  *         if src.shape[i] != dst.shape[i]:
   17175             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   17176             :  *                 broadcasting = True
   17177             :  *                 src.strides[i] = 0
   17178             :  */
   17179           0 :         goto __pyx_L7;
   17180             :       }
   17181             : 
   17182             :       /* "View.MemoryView":1294
   17183             :  *                 src.strides[i] = 0
   17184             :  *             else:
   17185             :  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
   17186             :  * 
   17187             :  *         if src.suboffsets[i] >= 0:
   17188             :  */
   17189             :       /*else*/ {
   17190           0 :         __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
   17191             :       }
   17192           0 :       __pyx_L7:;
   17193             : 
   17194             :       /* "View.MemoryView":1289
   17195             :  * 
   17196             :  *     for i in range(ndim):
   17197             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   17198             :  *             if src.shape[i] == 1:
   17199             :  *                 broadcasting = True
   17200             :  */
   17201             :     }
   17202             : 
   17203             :     /* "View.MemoryView":1296
   17204             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17205             :  * 
   17206             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17207             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17208             :  * 
   17209             :  */
   17210           0 :     __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
   17211           0 :     if (__pyx_t_2) {
   17212             : 
   17213             :       /* "View.MemoryView":1297
   17214             :  * 
   17215             :  *         if src.suboffsets[i] >= 0:
   17216             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
   17217             :  * 
   17218             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17219             :  */
   17220           0 :       __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
   17221             : 
   17222             :       /* "View.MemoryView":1296
   17223             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17224             :  * 
   17225             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17226             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17227             :  * 
   17228             :  */
   17229             :     }
   17230             :   }
   17231             : 
   17232             :   /* "View.MemoryView":1299
   17233             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17234             :  * 
   17235             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17236             :  * 
   17237             :  *         if not slice_is_contig(src, order, ndim):
   17238             :  */
   17239           0 :   __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17240           0 :   if (__pyx_t_2) {
   17241             : 
   17242             :     /* "View.MemoryView":1301
   17243             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17244             :  * 
   17245             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17246             :  *             order = get_best_order(&dst, ndim)
   17247             :  * 
   17248             :  */
   17249           0 :     __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
   17250           0 :     if (__pyx_t_2) {
   17251             : 
   17252             :       /* "View.MemoryView":1302
   17253             :  * 
   17254             :  *         if not slice_is_contig(src, order, ndim):
   17255             :  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
   17256             :  * 
   17257             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17258             :  */
   17259           0 :       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
   17260             : 
   17261             :       /* "View.MemoryView":1301
   17262             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17263             :  * 
   17264             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17265             :  *             order = get_best_order(&dst, ndim)
   17266             :  * 
   17267             :  */
   17268             :     }
   17269             : 
   17270             :     /* "View.MemoryView":1304
   17271             :  *             order = get_best_order(&dst, ndim)
   17272             :  * 
   17273             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
   17274             :  *         src = tmp
   17275             :  * 
   17276             :  */
   17277           0 :     __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
   17278           0 :     __pyx_v_tmpdata = __pyx_t_7;
   17279             : 
   17280             :     /* "View.MemoryView":1305
   17281             :  * 
   17282             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17283             :  *         src = tmp             # <<<<<<<<<<<<<<
   17284             :  * 
   17285             :  *     if not broadcasting:
   17286             :  */
   17287           0 :     __pyx_v_src = __pyx_v_tmp;
   17288             : 
   17289             :     /* "View.MemoryView":1299
   17290             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17291             :  * 
   17292             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17293             :  * 
   17294             :  *         if not slice_is_contig(src, order, ndim):
   17295             :  */
   17296             :   }
   17297             : 
   17298             :   /* "View.MemoryView":1307
   17299             :  *         src = tmp
   17300             :  * 
   17301             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17302             :  * 
   17303             :  * 
   17304             :  */
   17305           0 :   __pyx_t_2 = (!__pyx_v_broadcasting);
   17306           0 :   if (__pyx_t_2) {
   17307             : 
   17308             :     /* "View.MemoryView":1310
   17309             :  * 
   17310             :  * 
   17311             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17312             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17313             :  *         elif slice_is_contig(src, 'F', ndim):
   17314             :  */
   17315           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
   17316           0 :     if (__pyx_t_2) {
   17317             : 
   17318             :       /* "View.MemoryView":1311
   17319             :  * 
   17320             :  *         if slice_is_contig(src, 'C', ndim):
   17321             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
   17322             :  *         elif slice_is_contig(src, 'F', ndim):
   17323             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17324             :  */
   17325           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
   17326             : 
   17327             :       /* "View.MemoryView":1310
   17328             :  * 
   17329             :  * 
   17330             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17331             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17332             :  *         elif slice_is_contig(src, 'F', ndim):
   17333             :  */
   17334           0 :       goto __pyx_L12;
   17335             :     }
   17336             : 
   17337             :     /* "View.MemoryView":1312
   17338             :  *         if slice_is_contig(src, 'C', ndim):
   17339             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17340             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17341             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17342             :  * 
   17343             :  */
   17344           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
   17345           0 :     if (__pyx_t_2) {
   17346             : 
   17347             :       /* "View.MemoryView":1313
   17348             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17349             :  *         elif slice_is_contig(src, 'F', ndim):
   17350             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
   17351             :  * 
   17352             :  *         if direct_copy:
   17353             :  */
   17354           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
   17355             : 
   17356             :       /* "View.MemoryView":1312
   17357             :  *         if slice_is_contig(src, 'C', ndim):
   17358             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17359             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17360             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17361             :  * 
   17362             :  */
   17363             :     }
   17364           0 :     __pyx_L12:;
   17365             : 
   17366             :     /* "View.MemoryView":1315
   17367             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17368             :  * 
   17369             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17370             :  * 
   17371             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17372             :  */
   17373           0 :     if (__pyx_v_direct_copy) {
   17374             : 
   17375             :       /* "View.MemoryView":1317
   17376             :  *         if direct_copy:
   17377             :  * 
   17378             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17379             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17380             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17381             :  */
   17382           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17383             : 
   17384             :       /* "View.MemoryView":1318
   17385             :  * 
   17386             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17387             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
   17388             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17389             :  *             free(tmpdata)
   17390             :  */
   17391           0 :       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
   17392             : 
   17393             :       /* "View.MemoryView":1319
   17394             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17395             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17396             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17397             :  *             free(tmpdata)
   17398             :  *             return 0
   17399             :  */
   17400           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17401             : 
   17402             :       /* "View.MemoryView":1320
   17403             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17404             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17405             :  *             free(tmpdata)             # <<<<<<<<<<<<<<
   17406             :  *             return 0
   17407             :  * 
   17408             :  */
   17409           0 :       free(__pyx_v_tmpdata);
   17410             : 
   17411             :       /* "View.MemoryView":1321
   17412             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17413             :  *             free(tmpdata)
   17414             :  *             return 0             # <<<<<<<<<<<<<<
   17415             :  * 
   17416             :  *     if order == 'F' == get_best_order(&dst, ndim):
   17417             :  */
   17418           0 :       __pyx_r = 0;
   17419           0 :       goto __pyx_L0;
   17420             : 
   17421             :       /* "View.MemoryView":1315
   17422             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17423             :  * 
   17424             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17425             :  * 
   17426             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17427             :  */
   17428             :     }
   17429             : 
   17430             :     /* "View.MemoryView":1307
   17431             :  *         src = tmp
   17432             :  * 
   17433             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17434             :  * 
   17435             :  * 
   17436             :  */
   17437             :   }
   17438             : 
   17439             :   /* "View.MemoryView":1323
   17440             :  *             return 0
   17441             :  * 
   17442             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17443             :  * 
   17444             :  * 
   17445             :  */
   17446           0 :   __pyx_t_2 = (__pyx_v_order == 'F');
   17447           0 :   if (__pyx_t_2) {
   17448           0 :     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
   17449             :   }
   17450           0 :   if (__pyx_t_2) {
   17451             : 
   17452             :     /* "View.MemoryView":1326
   17453             :  * 
   17454             :  * 
   17455             :  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
   17456             :  *         transpose_memslice(&dst)
   17457             :  * 
   17458             :  */
   17459           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)
   17460             : 
   17461             :     /* "View.MemoryView":1327
   17462             :  * 
   17463             :  *         transpose_memslice(&src)
   17464             :  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
   17465             :  * 
   17466             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17467             :  */
   17468           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)
   17469             : 
   17470             :     /* "View.MemoryView":1323
   17471             :  *             return 0
   17472             :  * 
   17473             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17474             :  * 
   17475             :  * 
   17476             :  */
   17477             :   }
   17478             : 
   17479             :   /* "View.MemoryView":1329
   17480             :  *         transpose_memslice(&dst)
   17481             :  * 
   17482             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17483             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17484             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17485             :  */
   17486           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17487             : 
   17488             :   /* "View.MemoryView":1330
   17489             :  * 
   17490             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17491             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
   17492             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17493             :  * 
   17494             :  */
   17495           0 :   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17496             : 
   17497             :   /* "View.MemoryView":1331
   17498             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17499             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17500             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17501             :  * 
   17502             :  *     free(tmpdata)
   17503             :  */
   17504           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17505             : 
   17506             :   /* "View.MemoryView":1333
   17507             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17508             :  * 
   17509             :  *     free(tmpdata)             # <<<<<<<<<<<<<<
   17510             :  *     return 0
   17511             :  * 
   17512             :  */
   17513           0 :   free(__pyx_v_tmpdata);
   17514             : 
   17515             :   /* "View.MemoryView":1334
   17516             :  * 
   17517             :  *     free(tmpdata)
   17518             :  *     return 0             # <<<<<<<<<<<<<<
   17519             :  * 
   17520             :  * @cname('__pyx_memoryview_broadcast_leading')
   17521             :  */
   17522           0 :   __pyx_r = 0;
   17523           0 :   goto __pyx_L0;
   17524             : 
   17525             :   /* "View.MemoryView":1265
   17526             :  * 
   17527             :  * @cname('__pyx_memoryview_copy_contents')
   17528             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   17529             :  *                                   __Pyx_memviewslice dst,
   17530             :  *                                   int src_ndim, int dst_ndim,
   17531             :  */
   17532             : 
   17533             :   /* function exit code */
   17534           0 :   __pyx_L1_error:;
   17535             :   #ifdef WITH_THREAD
   17536           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17537             :   #endif
   17538           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17539           0 :   __pyx_r = -1;
   17540             :   #ifdef WITH_THREAD
   17541           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17542             :   #endif
   17543           0 :   __pyx_L0:;
   17544           0 :   return __pyx_r;
   17545             : }
   17546             : 
   17547             : /* "View.MemoryView":1337
   17548             :  * 
   17549             :  * @cname('__pyx_memoryview_broadcast_leading')
   17550             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17551             :  *                             int ndim,
   17552             :  *                             int ndim_other) noexcept nogil:
   17553             :  */
   17554             : 
   17555           0 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
   17556           0 :   int __pyx_v_i;
   17557           0 :   int __pyx_v_offset;
   17558           0 :   int __pyx_t_1;
   17559           0 :   int __pyx_t_2;
   17560           0 :   int __pyx_t_3;
   17561             : 
   17562             :   /* "View.MemoryView":1341
   17563             :  *                             int ndim_other) noexcept nogil:
   17564             :  *     cdef int i
   17565             :  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
   17566             :  * 
   17567             :  *     for i in range(ndim - 1, -1, -1):
   17568             :  */
   17569           0 :   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
   17570             : 
   17571             :   /* "View.MemoryView":1343
   17572             :  *     cdef int offset = ndim_other - ndim
   17573             :  * 
   17574             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   17575             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17576             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17577             :  */
   17578           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   17579           0 :     __pyx_v_i = __pyx_t_1;
   17580             : 
   17581             :     /* "View.MemoryView":1344
   17582             :  * 
   17583             :  *     for i in range(ndim - 1, -1, -1):
   17584             :  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
   17585             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17586             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17587             :  */
   17588           0 :     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
   17589             : 
   17590             :     /* "View.MemoryView":1345
   17591             :  *     for i in range(ndim - 1, -1, -1):
   17592             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17593             :  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
   17594             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17595             :  * 
   17596             :  */
   17597           0 :     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
   17598             : 
   17599             :     /* "View.MemoryView":1346
   17600             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17601             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17602             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
   17603             :  * 
   17604             :  *     for i in range(offset):
   17605             :  */
   17606           0 :     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
   17607             :   }
   17608             : 
   17609             :   /* "View.MemoryView":1348
   17610             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17611             :  * 
   17612             :  *     for i in range(offset):             # <<<<<<<<<<<<<<
   17613             :  *         mslice.shape[i] = 1
   17614             :  *         mslice.strides[i] = mslice.strides[0]
   17615             :  */
   17616           0 :   __pyx_t_1 = __pyx_v_offset;
   17617             :   __pyx_t_2 = __pyx_t_1;
   17618           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17619           0 :     __pyx_v_i = __pyx_t_3;
   17620             : 
   17621             :     /* "View.MemoryView":1349
   17622             :  * 
   17623             :  *     for i in range(offset):
   17624             :  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
   17625             :  *         mslice.strides[i] = mslice.strides[0]
   17626             :  *         mslice.suboffsets[i] = -1
   17627             :  */
   17628           0 :     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
   17629             : 
   17630             :     /* "View.MemoryView":1350
   17631             :  *     for i in range(offset):
   17632             :  *         mslice.shape[i] = 1
   17633             :  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
   17634             :  *         mslice.suboffsets[i] = -1
   17635             :  * 
   17636             :  */
   17637           0 :     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
   17638             : 
   17639             :     /* "View.MemoryView":1351
   17640             :  *         mslice.shape[i] = 1
   17641             :  *         mslice.strides[i] = mslice.strides[0]
   17642             :  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   17643             :  * 
   17644             :  * 
   17645             :  */
   17646           0 :     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
   17647             :   }
   17648             : 
   17649             :   /* "View.MemoryView":1337
   17650             :  * 
   17651             :  * @cname('__pyx_memoryview_broadcast_leading')
   17652             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17653             :  *                             int ndim,
   17654             :  *                             int ndim_other) noexcept nogil:
   17655             :  */
   17656             : 
   17657             :   /* function exit code */
   17658           0 : }
   17659             : 
   17660             : /* "View.MemoryView":1359
   17661             :  * 
   17662             :  * @cname('__pyx_memoryview_refcount_copying')
   17663             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17664             :  * 
   17665             :  *     if dtype_is_object:
   17666             :  */
   17667             : 
   17668           0 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
   17669             : 
   17670             :   /* "View.MemoryView":1361
   17671             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17672             :  * 
   17673             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17674             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17675             :  * 
   17676             :  */
   17677           0 :   if (__pyx_v_dtype_is_object) {
   17678             : 
   17679             :     /* "View.MemoryView":1362
   17680             :  * 
   17681             :  *     if dtype_is_object:
   17682             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
   17683             :  * 
   17684             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17685             :  */
   17686           0 :     __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
   17687             : 
   17688             :     /* "View.MemoryView":1361
   17689             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17690             :  * 
   17691             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17692             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17693             :  * 
   17694             :  */
   17695             :   }
   17696             : 
   17697             :   /* "View.MemoryView":1359
   17698             :  * 
   17699             :  * @cname('__pyx_memoryview_refcount_copying')
   17700             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17701             :  * 
   17702             :  *     if dtype_is_object:
   17703             :  */
   17704             : 
   17705             :   /* function exit code */
   17706           0 : }
   17707             : 
   17708             : /* "View.MemoryView":1365
   17709             :  * 
   17710             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17711             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17712             :  *                                              Py_ssize_t *strides, int ndim,
   17713             :  *                                              bint inc) noexcept with gil:
   17714             :  */
   17715             : 
   17716           0 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17717             :   #ifdef WITH_THREAD
   17718           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17719             :   #endif
   17720             : 
   17721             :   /* "View.MemoryView":1368
   17722             :  *                                              Py_ssize_t *strides, int ndim,
   17723             :  *                                              bint inc) noexcept with gil:
   17724             :  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
   17725             :  * 
   17726             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17727             :  */
   17728           0 :   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
   17729             : 
   17730             :   /* "View.MemoryView":1365
   17731             :  * 
   17732             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17733             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17734             :  *                                              Py_ssize_t *strides, int ndim,
   17735             :  *                                              bint inc) noexcept with gil:
   17736             :  */
   17737             : 
   17738             :   /* function exit code */
   17739             :   #ifdef WITH_THREAD
   17740           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17741             :   #endif
   17742           0 : }
   17743             : 
   17744             : /* "View.MemoryView":1371
   17745             :  * 
   17746             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17747             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17748             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17749             :  *     cdef Py_ssize_t i
   17750             :  */
   17751             : 
   17752           0 : static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17753           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17754           0 :   Py_ssize_t __pyx_v_stride;
   17755           0 :   Py_ssize_t __pyx_t_1;
   17756           0 :   Py_ssize_t __pyx_t_2;
   17757           0 :   Py_ssize_t __pyx_t_3;
   17758           0 :   int __pyx_t_4;
   17759             : 
   17760             :   /* "View.MemoryView":1374
   17761             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17762             :  *     cdef Py_ssize_t i
   17763             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17764             :  * 
   17765             :  *     for i in range(shape[0]):
   17766             :  */
   17767           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17768             : 
   17769             :   /* "View.MemoryView":1376
   17770             :  *     cdef Py_ssize_t stride = strides[0]
   17771             :  * 
   17772             :  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
   17773             :  *         if ndim == 1:
   17774             :  *             if inc:
   17775             :  */
   17776           0 :   __pyx_t_1 = (__pyx_v_shape[0]);
   17777           0 :   __pyx_t_2 = __pyx_t_1;
   17778           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17779           0 :     __pyx_v_i = __pyx_t_3;
   17780             : 
   17781             :     /* "View.MemoryView":1377
   17782             :  * 
   17783             :  *     for i in range(shape[0]):
   17784             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17785             :  *             if inc:
   17786             :  *                 Py_INCREF((<PyObject **> data)[0])
   17787             :  */
   17788           0 :     __pyx_t_4 = (__pyx_v_ndim == 1);
   17789           0 :     if (__pyx_t_4) {
   17790             : 
   17791             :       /* "View.MemoryView":1378
   17792             :  *     for i in range(shape[0]):
   17793             :  *         if ndim == 1:
   17794             :  *             if inc:             # <<<<<<<<<<<<<<
   17795             :  *                 Py_INCREF((<PyObject **> data)[0])
   17796             :  *             else:
   17797             :  */
   17798           0 :       if (__pyx_v_inc) {
   17799             : 
   17800             :         /* "View.MemoryView":1379
   17801             :  *         if ndim == 1:
   17802             :  *             if inc:
   17803             :  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17804             :  *             else:
   17805             :  *                 Py_DECREF((<PyObject **> data)[0])
   17806             :  */
   17807           0 :         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
   17808             : 
   17809             :         /* "View.MemoryView":1378
   17810             :  *     for i in range(shape[0]):
   17811             :  *         if ndim == 1:
   17812             :  *             if inc:             # <<<<<<<<<<<<<<
   17813             :  *                 Py_INCREF((<PyObject **> data)[0])
   17814             :  *             else:
   17815             :  */
   17816           0 :         goto __pyx_L6;
   17817             :       }
   17818             : 
   17819             :       /* "View.MemoryView":1381
   17820             :  *                 Py_INCREF((<PyObject **> data)[0])
   17821             :  *             else:
   17822             :  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17823             :  *         else:
   17824             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17825             :  */
   17826             :       /*else*/ {
   17827           0 :         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
   17828             :       }
   17829           0 :       __pyx_L6:;
   17830             : 
   17831             :       /* "View.MemoryView":1377
   17832             :  * 
   17833             :  *     for i in range(shape[0]):
   17834             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17835             :  *             if inc:
   17836             :  *                 Py_INCREF((<PyObject **> data)[0])
   17837             :  */
   17838           0 :       goto __pyx_L5;
   17839             :     }
   17840             : 
   17841             :     /* "View.MemoryView":1383
   17842             :  *                 Py_DECREF((<PyObject **> data)[0])
   17843             :  *         else:
   17844             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
   17845             :  * 
   17846             :  *         data += stride
   17847             :  */
   17848             :     /*else*/ {
   17849           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
   17850             :     }
   17851           0 :     __pyx_L5:;
   17852             : 
   17853             :     /* "View.MemoryView":1385
   17854             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17855             :  * 
   17856             :  *         data += stride             # <<<<<<<<<<<<<<
   17857             :  * 
   17858             :  * 
   17859             :  */
   17860           0 :     __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17861             :   }
   17862             : 
   17863             :   /* "View.MemoryView":1371
   17864             :  * 
   17865             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17866             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17867             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17868             :  *     cdef Py_ssize_t i
   17869             :  */
   17870             : 
   17871             :   /* function exit code */
   17872           0 : }
   17873             : 
   17874             : /* "View.MemoryView":1391
   17875             :  * 
   17876             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17877             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17878             :  *                               size_t itemsize, void *item,
   17879             :  *                               bint dtype_is_object) noexcept nogil:
   17880             :  */
   17881             : 
   17882           0 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
   17883             : 
   17884             :   /* "View.MemoryView":1394
   17885             :  *                               size_t itemsize, void *item,
   17886             :  *                               bint dtype_is_object) noexcept nogil:
   17887             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17888             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17889             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17890             :  */
   17891           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17892             : 
   17893             :   /* "View.MemoryView":1395
   17894             :  *                               bint dtype_is_object) noexcept nogil:
   17895             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17896             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
   17897             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17898             :  * 
   17899             :  */
   17900           0 :   __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
   17901             : 
   17902             :   /* "View.MemoryView":1396
   17903             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17904             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17905             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17906             :  * 
   17907             :  * 
   17908             :  */
   17909           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17910             : 
   17911             :   /* "View.MemoryView":1391
   17912             :  * 
   17913             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17914             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17915             :  *                               size_t itemsize, void *item,
   17916             :  *                               bint dtype_is_object) noexcept nogil:
   17917             :  */
   17918             : 
   17919             :   /* function exit code */
   17920           0 : }
   17921             : 
   17922             : /* "View.MemoryView":1400
   17923             :  * 
   17924             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   17925             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17926             :  *                               Py_ssize_t *strides, int ndim,
   17927             :  *                               size_t itemsize, void *item) noexcept nogil:
   17928             :  */
   17929             : 
   17930           0 : static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
   17931           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17932           0 :   Py_ssize_t __pyx_v_stride;
   17933           0 :   Py_ssize_t __pyx_v_extent;
   17934           0 :   int __pyx_t_1;
   17935           0 :   Py_ssize_t __pyx_t_2;
   17936           0 :   Py_ssize_t __pyx_t_3;
   17937           0 :   Py_ssize_t __pyx_t_4;
   17938             : 
   17939             :   /* "View.MemoryView":1404
   17940             :  *                               size_t itemsize, void *item) noexcept nogil:
   17941             :  *     cdef Py_ssize_t i
   17942             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17943             :  *     cdef Py_ssize_t extent = shape[0]
   17944             :  * 
   17945             :  */
   17946           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17947             : 
   17948             :   /* "View.MemoryView":1405
   17949             :  *     cdef Py_ssize_t i
   17950             :  *     cdef Py_ssize_t stride = strides[0]
   17951             :  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
   17952             :  * 
   17953             :  *     if ndim == 1:
   17954             :  */
   17955           0 :   __pyx_v_extent = (__pyx_v_shape[0]);
   17956             : 
   17957             :   /* "View.MemoryView":1407
   17958             :  *     cdef Py_ssize_t extent = shape[0]
   17959             :  * 
   17960             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   17961             :  *         for i in range(extent):
   17962             :  *             memcpy(data, item, itemsize)
   17963             :  */
   17964           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   17965           0 :   if (__pyx_t_1) {
   17966             : 
   17967             :     /* "View.MemoryView":1408
   17968             :  * 
   17969             :  *     if ndim == 1:
   17970             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   17971             :  *             memcpy(data, item, itemsize)
   17972             :  *             data += stride
   17973             :  */
   17974             :     __pyx_t_2 = __pyx_v_extent;
   17975             :     __pyx_t_3 = __pyx_t_2;
   17976           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17977           0 :       __pyx_v_i = __pyx_t_4;
   17978             : 
   17979             :       /* "View.MemoryView":1409
   17980             :  *     if ndim == 1:
   17981             :  *         for i in range(extent):
   17982             :  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
   17983             :  *             data += stride
   17984             :  *     else:
   17985             :  */
   17986           0 :       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
   17987             : 
   17988             :       /* "View.MemoryView":1410
   17989             :  *         for i in range(extent):
   17990             :  *             memcpy(data, item, itemsize)
   17991             :  *             data += stride             # <<<<<<<<<<<<<<
   17992             :  *     else:
   17993             :  *         for i in range(extent):
   17994             :  */
   17995           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17996             :     }
   17997             : 
   17998             :     /* "View.MemoryView":1407
   17999             :  *     cdef Py_ssize_t extent = shape[0]
   18000             :  * 
   18001             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   18002             :  *         for i in range(extent):
   18003             :  *             memcpy(data, item, itemsize)
   18004             :  */
   18005           0 :     goto __pyx_L3;
   18006             :   }
   18007             : 
   18008             :   /* "View.MemoryView":1412
   18009             :  *             data += stride
   18010             :  *     else:
   18011             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   18012             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   18013             :  *             data += stride
   18014             :  */
   18015             :   /*else*/ {
   18016             :     __pyx_t_2 = __pyx_v_extent;
   18017             :     __pyx_t_3 = __pyx_t_2;
   18018           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   18019           0 :       __pyx_v_i = __pyx_t_4;
   18020             : 
   18021             :       /* "View.MemoryView":1413
   18022             :  *     else:
   18023             :  *         for i in range(extent):
   18024             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
   18025             :  *             data += stride
   18026             :  * 
   18027             :  */
   18028           0 :       __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
   18029             : 
   18030             :       /* "View.MemoryView":1414
   18031             :  *         for i in range(extent):
   18032             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   18033             :  *             data += stride             # <<<<<<<<<<<<<<
   18034             :  * 
   18035             :  * 
   18036             :  */
   18037           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   18038             :     }
   18039             :   }
   18040           0 :   __pyx_L3:;
   18041             : 
   18042             :   /* "View.MemoryView":1400
   18043             :  * 
   18044             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   18045             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18046             :  *                               Py_ssize_t *strides, int ndim,
   18047             :  *                               size_t itemsize, void *item) noexcept nogil:
   18048             :  */
   18049             : 
   18050             :   /* function exit code */
   18051           0 : }
   18052             : 
   18053             : /* "(tree fragment)":1
   18054             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18055             :  *     cdef object __pyx_PickleError
   18056             :  *     cdef object __pyx_result
   18057             :  */
   18058             : 
   18059             : /* Python wrapper */
   18060             : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   18061             : #if CYTHON_METH_FASTCALL
   18062             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18063             : #else
   18064             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18065             : #endif
   18066             : ); /*proto*/
   18067             : static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   18068           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   18069             : #if CYTHON_METH_FASTCALL
   18070             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18071             : #else
   18072             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18073             : #endif
   18074             : ) {
   18075           0 :   PyObject *__pyx_v___pyx_type = 0;
   18076           0 :   long __pyx_v___pyx_checksum;
   18077           0 :   PyObject *__pyx_v___pyx_state = 0;
   18078             :   #if !CYTHON_METH_FASTCALL
   18079             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   18080             :   #endif
   18081           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   18082           0 :   PyObject* values[3] = {0,0,0};
   18083           0 :   int __pyx_lineno = 0;
   18084           0 :   const char *__pyx_filename = NULL;
   18085           0 :   int __pyx_clineno = 0;
   18086           0 :   PyObject *__pyx_r = 0;
   18087             :   __Pyx_RefNannyDeclarations
   18088           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
   18089             :   #if !CYTHON_METH_FASTCALL
   18090             :   #if CYTHON_ASSUME_SAFE_MACROS
   18091             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   18092             :   #else
   18093             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   18094             :   #endif
   18095             :   #endif
   18096           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   18097             :   {
   18098           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
   18099           0 :     if (__pyx_kwds) {
   18100           0 :       Py_ssize_t kw_args;
   18101           0 :       switch (__pyx_nargs) {
   18102           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   18103           0 :         CYTHON_FALLTHROUGH;
   18104           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   18105           0 :         CYTHON_FALLTHROUGH;
   18106           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   18107           0 :         CYTHON_FALLTHROUGH;
   18108           0 :         case  0: break;
   18109           0 :         default: goto __pyx_L5_argtuple_error;
   18110             :       }
   18111           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   18112           0 :       switch (__pyx_nargs) {
   18113           0 :         case  0:
   18114           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
   18115           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   18116           0 :           kw_args--;
   18117             :         }
   18118           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18119           0 :         else goto __pyx_L5_argtuple_error;
   18120           0 :         CYTHON_FALLTHROUGH;
   18121             :         case  1:
   18122           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
   18123           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   18124           0 :           kw_args--;
   18125             :         }
   18126           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18127             :         else {
   18128           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
   18129             :         }
   18130           0 :         CYTHON_FALLTHROUGH;
   18131             :         case  2:
   18132           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   18133           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   18134           0 :           kw_args--;
   18135             :         }
   18136           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18137             :         else {
   18138           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
   18139             :         }
   18140             :       }
   18141           0 :       if (unlikely(kw_args > 0)) {
   18142           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   18143           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
   18144             :       }
   18145           0 :     } else if (unlikely(__pyx_nargs != 3)) {
   18146           0 :       goto __pyx_L5_argtuple_error;
   18147             :     } else {
   18148           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   18149           0 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   18150           0 :       values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   18151             :     }
   18152           0 :     __pyx_v___pyx_type = values[0];
   18153           0 :     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18154           0 :     __pyx_v___pyx_state = values[2];
   18155             :   }
   18156           0 :   goto __pyx_L6_skip;
   18157           0 :   __pyx_L5_argtuple_error:;
   18158           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
   18159           0 :   __pyx_L6_skip:;
   18160           0 :   goto __pyx_L4_argument_unpacking_done;
   18161           0 :   __pyx_L3_error:;
   18162             :   {
   18163           0 :     Py_ssize_t __pyx_temp;
   18164           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   18165             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   18166             :     }
   18167             :   }
   18168           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18169           0 :   __Pyx_RefNannyFinishContext();
   18170           0 :   return NULL;
   18171           0 :   __pyx_L4_argument_unpacking_done:;
   18172           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
   18173             : 
   18174             :   /* function exit code */
   18175             :   {
   18176           0 :     Py_ssize_t __pyx_temp;
   18177           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   18178             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   18179             :     }
   18180             :   }
   18181             :   __Pyx_RefNannyFinishContext();
   18182             :   return __pyx_r;
   18183             : }
   18184             : 
   18185           0 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
   18186           0 :   PyObject *__pyx_v___pyx_PickleError = 0;
   18187           0 :   PyObject *__pyx_v___pyx_result = 0;
   18188           0 :   PyObject *__pyx_r = NULL;
   18189             :   __Pyx_RefNannyDeclarations
   18190           0 :   PyObject *__pyx_t_1 = NULL;
   18191           0 :   int __pyx_t_2;
   18192           0 :   PyObject *__pyx_t_3 = NULL;
   18193           0 :   PyObject *__pyx_t_4 = NULL;
   18194           0 :   unsigned int __pyx_t_5;
   18195           0 :   int __pyx_lineno = 0;
   18196           0 :   const char *__pyx_filename = NULL;
   18197           0 :   int __pyx_clineno = 0;
   18198           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);
   18199             : 
   18200             :   /* "(tree fragment)":4
   18201             :  *     cdef object __pyx_PickleError
   18202             :  *     cdef object __pyx_result
   18203             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18204             :  *         from pickle import PickleError as __pyx_PickleError
   18205             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18206             :  */
   18207           0 :   __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
   18208           0 :   __Pyx_GOTREF(__pyx_t_1);
   18209           0 :   __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
   18210           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18211           0 :   if (__pyx_t_2) {
   18212             : 
   18213             :     /* "(tree fragment)":5
   18214             :  *     cdef object __pyx_result
   18215             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18216             :  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
   18217             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18218             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18219             :  */
   18220           0 :     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18221           0 :     __Pyx_GOTREF(__pyx_t_1);
   18222           0 :     __Pyx_INCREF(__pyx_n_s_PickleError);
   18223           0 :     __Pyx_GIVEREF(__pyx_n_s_PickleError);
   18224           0 :     if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
   18225           0 :     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
   18226           0 :     __Pyx_GOTREF(__pyx_t_3);
   18227           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18228           0 :     __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18229           0 :     __Pyx_GOTREF(__pyx_t_1);
   18230           0 :     __Pyx_INCREF(__pyx_t_1);
   18231           0 :     __pyx_v___pyx_PickleError = __pyx_t_1;
   18232           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18233           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18234             : 
   18235             :     /* "(tree fragment)":6
   18236             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18237             :  *         from pickle import PickleError as __pyx_PickleError
   18238             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum             # <<<<<<<<<<<<<<
   18239             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18240             :  *     if __pyx_state is not None:
   18241             :  */
   18242           0 :     __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
   18243           0 :     __Pyx_GOTREF(__pyx_t_3);
   18244           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
   18245           0 :     __Pyx_GOTREF(__pyx_t_1);
   18246           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18247           0 :     __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
   18248           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18249           0 :     __PYX_ERR(1, 6, __pyx_L1_error)
   18250             : 
   18251             :     /* "(tree fragment)":4
   18252             :  *     cdef object __pyx_PickleError
   18253             :  *     cdef object __pyx_result
   18254             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18255             :  *         from pickle import PickleError as __pyx_PickleError
   18256             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18257             :  */
   18258             :   }
   18259             : 
   18260             :   /* "(tree fragment)":7
   18261             :  *         from pickle import PickleError as __pyx_PickleError
   18262             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18263             :  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
   18264             :  *     if __pyx_state is not None:
   18265             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18266             :  */
   18267           0 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
   18268           0 :   __Pyx_GOTREF(__pyx_t_3);
   18269           0 :   __pyx_t_4 = NULL;
   18270           0 :   __pyx_t_5 = 0;
   18271             :   #if CYTHON_UNPACK_METHODS
   18272           0 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   18273           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
   18274           0 :     if (likely(__pyx_t_4)) {
   18275           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   18276           0 :       __Pyx_INCREF(__pyx_t_4);
   18277           0 :       __Pyx_INCREF(function);
   18278           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   18279             :       __pyx_t_5 = 1;
   18280             :     }
   18281             :   }
   18282             :   #endif
   18283             :   {
   18284           0 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
   18285           0 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   18286           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   18287           0 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
   18288           0 :     __Pyx_GOTREF(__pyx_t_1);
   18289           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18290             :   }
   18291           0 :   __pyx_v___pyx_result = __pyx_t_1;
   18292           0 :   __pyx_t_1 = 0;
   18293             : 
   18294             :   /* "(tree fragment)":8
   18295             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18296             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18297             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18298             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18299             :  *     return __pyx_result
   18300             :  */
   18301           0 :   __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
   18302           0 :   if (__pyx_t_2) {
   18303             : 
   18304             :     /* "(tree fragment)":9
   18305             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18306             :  *     if __pyx_state is not None:
   18307             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
   18308             :  *     return __pyx_result
   18309             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18310             :  */
   18311           0 :     if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
   18312           0 :     __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
   18313           0 :     __Pyx_GOTREF(__pyx_t_1);
   18314           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18315             : 
   18316             :     /* "(tree fragment)":8
   18317             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18318             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18319             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18320             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18321             :  *     return __pyx_result
   18322             :  */
   18323             :   }
   18324             : 
   18325             :   /* "(tree fragment)":10
   18326             :  *     if __pyx_state is not None:
   18327             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18328             :  *     return __pyx_result             # <<<<<<<<<<<<<<
   18329             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18330             :  *     __pyx_result.name = __pyx_state[0]
   18331             :  */
   18332           0 :   __Pyx_XDECREF(__pyx_r);
   18333           0 :   __Pyx_INCREF(__pyx_v___pyx_result);
   18334           0 :   __pyx_r = __pyx_v___pyx_result;
   18335           0 :   goto __pyx_L0;
   18336             : 
   18337             :   /* "(tree fragment)":1
   18338             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18339             :  *     cdef object __pyx_PickleError
   18340             :  *     cdef object __pyx_result
   18341             :  */
   18342             : 
   18343             :   /* function exit code */
   18344           0 :   __pyx_L1_error:;
   18345           0 :   __Pyx_XDECREF(__pyx_t_1);
   18346           0 :   __Pyx_XDECREF(__pyx_t_3);
   18347           0 :   __Pyx_XDECREF(__pyx_t_4);
   18348           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18349           0 :   __pyx_r = NULL;
   18350           0 :   __pyx_L0:;
   18351           0 :   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
   18352           0 :   __Pyx_XDECREF(__pyx_v___pyx_result);
   18353           0 :   __Pyx_XGIVEREF(__pyx_r);
   18354           0 :   __Pyx_RefNannyFinishContext();
   18355           0 :   return __pyx_r;
   18356             : }
   18357             : 
   18358             : /* "(tree fragment)":11
   18359             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18360             :  *     return __pyx_result
   18361             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18362             :  *     __pyx_result.name = __pyx_state[0]
   18363             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18364             :  */
   18365             : 
   18366           0 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
   18367           0 :   PyObject *__pyx_r = NULL;
   18368             :   __Pyx_RefNannyDeclarations
   18369           0 :   PyObject *__pyx_t_1 = NULL;
   18370           0 :   int __pyx_t_2;
   18371           0 :   Py_ssize_t __pyx_t_3;
   18372           0 :   int __pyx_t_4;
   18373           0 :   PyObject *__pyx_t_5 = NULL;
   18374           0 :   PyObject *__pyx_t_6 = NULL;
   18375           0 :   PyObject *__pyx_t_7 = NULL;
   18376           0 :   unsigned int __pyx_t_8;
   18377           0 :   int __pyx_lineno = 0;
   18378           0 :   const char *__pyx_filename = NULL;
   18379           0 :   int __pyx_clineno = 0;
   18380           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);
   18381             : 
   18382             :   /* "(tree fragment)":12
   18383             :  *     return __pyx_result
   18384             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18385             :  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
   18386             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18387             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18388             :  */
   18389           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18390           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18391           0 :     __PYX_ERR(1, 12, __pyx_L1_error)
   18392             :   }
   18393           0 :   __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
   18394           0 :   __Pyx_GOTREF(__pyx_t_1);
   18395           0 :   __Pyx_GIVEREF(__pyx_t_1);
   18396           0 :   __Pyx_GOTREF(__pyx_v___pyx_result->name);
   18397           0 :   __Pyx_DECREF(__pyx_v___pyx_result->name);
   18398           0 :   __pyx_v___pyx_result->name = __pyx_t_1;
   18399           0 :   __pyx_t_1 = 0;
   18400             : 
   18401             :   /* "(tree fragment)":13
   18402             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18403             :  *     __pyx_result.name = __pyx_state[0]
   18404             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18405             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18406             :  */
   18407           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18408             :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   18409             :     __PYX_ERR(1, 13, __pyx_L1_error)
   18410             :   }
   18411           0 :   __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18412           0 :   __pyx_t_4 = (__pyx_t_3 > 1);
   18413           0 :   if (__pyx_t_4) {
   18414           0 :   } else {
   18415           0 :     __pyx_t_2 = __pyx_t_4;
   18416           0 :     goto __pyx_L4_bool_binop_done;
   18417             :   }
   18418           0 :   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18419             :   __pyx_t_2 = __pyx_t_4;
   18420           0 :   __pyx_L4_bool_binop_done:;
   18421           0 :   if (__pyx_t_2) {
   18422             : 
   18423             :     /* "(tree fragment)":14
   18424             :  *     __pyx_result.name = __pyx_state[0]
   18425             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18426             :  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
   18427             :  */
   18428           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18429           0 :     __Pyx_GOTREF(__pyx_t_5);
   18430           0 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
   18431           0 :     __Pyx_GOTREF(__pyx_t_6);
   18432           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18433           0 :     if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18434             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18435             :       __PYX_ERR(1, 14, __pyx_L1_error)
   18436             :     }
   18437           0 :     __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18438           0 :     __Pyx_GOTREF(__pyx_t_5);
   18439           0 :     __pyx_t_7 = NULL;
   18440           0 :     __pyx_t_8 = 0;
   18441             :     #if CYTHON_UNPACK_METHODS
   18442           0 :     if (likely(PyMethod_Check(__pyx_t_6))) {
   18443           0 :       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
   18444           0 :       if (likely(__pyx_t_7)) {
   18445           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   18446           0 :         __Pyx_INCREF(__pyx_t_7);
   18447           0 :         __Pyx_INCREF(function);
   18448           0 :         __Pyx_DECREF_SET(__pyx_t_6, function);
   18449             :         __pyx_t_8 = 1;
   18450             :       }
   18451             :     }
   18452             :     #endif
   18453             :     {
   18454           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
   18455           0 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
   18456           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   18457           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18458           0 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
   18459           0 :       __Pyx_GOTREF(__pyx_t_1);
   18460           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   18461             :     }
   18462           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18463             : 
   18464             :     /* "(tree fragment)":13
   18465             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18466             :  *     __pyx_result.name = __pyx_state[0]
   18467             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18468             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18469             :  */
   18470             :   }
   18471             : 
   18472             :   /* "(tree fragment)":11
   18473             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18474             :  *     return __pyx_result
   18475             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18476             :  *     __pyx_result.name = __pyx_state[0]
   18477             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18478             :  */
   18479             : 
   18480             :   /* function exit code */
   18481           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   18482           0 :   goto __pyx_L0;
   18483           0 :   __pyx_L1_error:;
   18484           0 :   __Pyx_XDECREF(__pyx_t_1);
   18485           0 :   __Pyx_XDECREF(__pyx_t_5);
   18486           0 :   __Pyx_XDECREF(__pyx_t_6);
   18487           0 :   __Pyx_XDECREF(__pyx_t_7);
   18488           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18489           0 :   __pyx_r = 0;
   18490           0 :   __pyx_L0:;
   18491           0 :   __Pyx_XGIVEREF(__pyx_r);
   18492           0 :   __Pyx_RefNannyFinishContext();
   18493           0 :   return __pyx_r;
   18494             : }
   18495             : 
   18496             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18497             :  * 
   18498             :  *         @property
   18499             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18500             :  *             return PyDataType_ELSIZE(self)
   18501             :  * 
   18502             :  */
   18503             : 
   18504             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
   18505             :   npy_intp __pyx_r;
   18506             : 
   18507             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
   18508             :  *         @property
   18509             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:
   18510             :  *             return PyDataType_ELSIZE(self)             # <<<<<<<<<<<<<<
   18511             :  * 
   18512             :  *         @property
   18513             :  */
   18514             :   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
   18515             :   goto __pyx_L0;
   18516             : 
   18517             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18518             :  * 
   18519             :  *         @property
   18520             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18521             :  *             return PyDataType_ELSIZE(self)
   18522             :  * 
   18523             :  */
   18524             : 
   18525             :   /* function exit code */
   18526             :   __pyx_L0:;
   18527             :   return __pyx_r;
   18528             : }
   18529             : 
   18530             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18531             :  * 
   18532             :  *         @property
   18533             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18534             :  *             return PyDataType_ALIGNMENT(self)
   18535             :  * 
   18536             :  */
   18537             : 
   18538             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
   18539             :   npy_intp __pyx_r;
   18540             : 
   18541             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291
   18542             :  *         @property
   18543             :  *         cdef inline npy_intp alignment(self) noexcept nogil:
   18544             :  *             return PyDataType_ALIGNMENT(self)             # <<<<<<<<<<<<<<
   18545             :  * 
   18546             :  *         # Use fields/names with care as they may be NULL.  You must check
   18547             :  */
   18548             :   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
   18549             :   goto __pyx_L0;
   18550             : 
   18551             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18552             :  * 
   18553             :  *         @property
   18554             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18555             :  *             return PyDataType_ALIGNMENT(self)
   18556             :  * 
   18557             :  */
   18558             : 
   18559             :   /* function exit code */
   18560             :   __pyx_L0:;
   18561             :   return __pyx_r;
   18562             : }
   18563             : 
   18564             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18565             :  *         # for this using PyDataType_HASFIELDS.
   18566             :  *         @property
   18567             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18568             :  *             return <object>PyDataType_FIELDS(self)
   18569             :  * 
   18570             :  */
   18571             : 
   18572             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
   18573             :   PyObject *__pyx_r = NULL;
   18574             :   __Pyx_RefNannyDeclarations
   18575             :   PyObject *__pyx_t_1;
   18576             :   __Pyx_RefNannySetupContext("fields", 1);
   18577             : 
   18578             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
   18579             :  *         @property
   18580             :  *         cdef inline object fields(self):
   18581             :  *             return <object>PyDataType_FIELDS(self)             # <<<<<<<<<<<<<<
   18582             :  * 
   18583             :  *         @property
   18584             :  */
   18585             :   __Pyx_XDECREF(__pyx_r);
   18586             :   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
   18587             :   __Pyx_INCREF(((PyObject *)__pyx_t_1));
   18588             :   __pyx_r = ((PyObject *)__pyx_t_1);
   18589             :   goto __pyx_L0;
   18590             : 
   18591             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18592             :  *         # for this using PyDataType_HASFIELDS.
   18593             :  *         @property
   18594             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18595             :  *             return <object>PyDataType_FIELDS(self)
   18596             :  * 
   18597             :  */
   18598             : 
   18599             :   /* function exit code */
   18600             :   __pyx_L0:;
   18601             :   __Pyx_XGIVEREF(__pyx_r);
   18602             :   __Pyx_RefNannyFinishContext();
   18603             :   return __pyx_r;
   18604             : }
   18605             : 
   18606             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18607             :  * 
   18608             :  *         @property
   18609             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18610             :  *             return <tuple>PyDataType_NAMES(self)
   18611             :  * 
   18612             :  */
   18613             : 
   18614             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
   18615             :   PyObject *__pyx_r = NULL;
   18616             :   __Pyx_RefNannyDeclarations
   18617             :   PyObject *__pyx_t_1;
   18618             :   __Pyx_RefNannySetupContext("names", 1);
   18619             : 
   18620             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301
   18621             :  *         @property
   18622             :  *         cdef inline tuple names(self):
   18623             :  *             return <tuple>PyDataType_NAMES(self)             # <<<<<<<<<<<<<<
   18624             :  * 
   18625             :  *         # Use PyDataType_HASSUBARRAY to test whether this field is
   18626             :  */
   18627             :   __Pyx_XDECREF(__pyx_r);
   18628             :   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
   18629             :   __Pyx_INCREF(((PyObject*)__pyx_t_1));
   18630             :   __pyx_r = ((PyObject*)__pyx_t_1);
   18631             :   goto __pyx_L0;
   18632             : 
   18633             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18634             :  * 
   18635             :  *         @property
   18636             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18637             :  *             return <tuple>PyDataType_NAMES(self)
   18638             :  * 
   18639             :  */
   18640             : 
   18641             :   /* function exit code */
   18642             :   __pyx_L0:;
   18643             :   __Pyx_XGIVEREF(__pyx_r);
   18644             :   __Pyx_RefNannyFinishContext();
   18645             :   return __pyx_r;
   18646             : }
   18647             : 
   18648             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18649             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18650             :  *         @property
   18651             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18652             :  *             return PyDataType_SUBARRAY(self)
   18653             :  * 
   18654             :  */
   18655             : 
   18656             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
   18657             :   PyArray_ArrayDescr *__pyx_r;
   18658             : 
   18659             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
   18660             :  *         @property
   18661             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
   18662             :  *             return PyDataType_SUBARRAY(self)             # <<<<<<<<<<<<<<
   18663             :  * 
   18664             :  *         @property
   18665             :  */
   18666             :   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
   18667             :   goto __pyx_L0;
   18668             : 
   18669             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18670             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18671             :  *         @property
   18672             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18673             :  *             return PyDataType_SUBARRAY(self)
   18674             :  * 
   18675             :  */
   18676             : 
   18677             :   /* function exit code */
   18678             :   __pyx_L0:;
   18679             :   return __pyx_r;
   18680             : }
   18681             : 
   18682             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18683             :  * 
   18684             :  *         @property
   18685             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18686             :  *             """The data types flags."""
   18687             :  *             return PyDataType_FLAGS(self)
   18688             :  */
   18689             : 
   18690             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
   18691             :   npy_uint64 __pyx_r;
   18692             : 
   18693             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313
   18694             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:
   18695             :  *             """The data types flags."""
   18696             :  *             return PyDataType_FLAGS(self)             # <<<<<<<<<<<<<<
   18697             :  * 
   18698             :  * 
   18699             :  */
   18700             :   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
   18701             :   goto __pyx_L0;
   18702             : 
   18703             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18704             :  * 
   18705             :  *         @property
   18706             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18707             :  *             """The data types flags."""
   18708             :  *             return PyDataType_FLAGS(self)
   18709             :  */
   18710             : 
   18711             :   /* function exit code */
   18712             :   __pyx_L0:;
   18713             :   return __pyx_r;
   18714             : }
   18715             : 
   18716             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18717             :  * 
   18718             :  *         @property
   18719             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18720             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18721             :  *             return PyArray_MultiIter_NUMITER(self)
   18722             :  */
   18723             : 
   18724             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
   18725             :   int __pyx_r;
   18726             : 
   18727             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325
   18728             :  *         cdef inline int numiter(self) noexcept nogil:
   18729             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18730             :  *             return PyArray_MultiIter_NUMITER(self)             # <<<<<<<<<<<<<<
   18731             :  * 
   18732             :  *         @property
   18733             :  */
   18734             :   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
   18735             :   goto __pyx_L0;
   18736             : 
   18737             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18738             :  * 
   18739             :  *         @property
   18740             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18741             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18742             :  *             return PyArray_MultiIter_NUMITER(self)
   18743             :  */
   18744             : 
   18745             :   /* function exit code */
   18746             :   __pyx_L0:;
   18747             :   return __pyx_r;
   18748             : }
   18749             : 
   18750             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18751             :  * 
   18752             :  *         @property
   18753             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18754             :  *             """The total broadcasted size."""
   18755             :  *             return PyArray_MultiIter_SIZE(self)
   18756             :  */
   18757             : 
   18758             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
   18759             :   npy_intp __pyx_r;
   18760             : 
   18761             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330
   18762             :  *         cdef inline npy_intp size(self) noexcept nogil:
   18763             :  *             """The total broadcasted size."""
   18764             :  *             return PyArray_MultiIter_SIZE(self)             # <<<<<<<<<<<<<<
   18765             :  * 
   18766             :  *         @property
   18767             :  */
   18768             :   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
   18769             :   goto __pyx_L0;
   18770             : 
   18771             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18772             :  * 
   18773             :  *         @property
   18774             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18775             :  *             """The total broadcasted size."""
   18776             :  *             return PyArray_MultiIter_SIZE(self)
   18777             :  */
   18778             : 
   18779             :   /* function exit code */
   18780             :   __pyx_L0:;
   18781             :   return __pyx_r;
   18782             : }
   18783             : 
   18784             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18785             :  * 
   18786             :  *         @property
   18787             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18788             :  *             """The current (1-d) index into the broadcasted result."""
   18789             :  *             return PyArray_MultiIter_INDEX(self)
   18790             :  */
   18791             : 
   18792             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
   18793             :   npy_intp __pyx_r;
   18794             : 
   18795             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335
   18796             :  *         cdef inline npy_intp index(self) noexcept nogil:
   18797             :  *             """The current (1-d) index into the broadcasted result."""
   18798             :  *             return PyArray_MultiIter_INDEX(self)             # <<<<<<<<<<<<<<
   18799             :  * 
   18800             :  *         @property
   18801             :  */
   18802             :   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
   18803             :   goto __pyx_L0;
   18804             : 
   18805             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18806             :  * 
   18807             :  *         @property
   18808             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18809             :  *             """The current (1-d) index into the broadcasted result."""
   18810             :  *             return PyArray_MultiIter_INDEX(self)
   18811             :  */
   18812             : 
   18813             :   /* function exit code */
   18814             :   __pyx_L0:;
   18815             :   return __pyx_r;
   18816             : }
   18817             : 
   18818             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18819             :  * 
   18820             :  *         @property
   18821             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18822             :  *             """The number of dimensions in the broadcasted result."""
   18823             :  *             return PyArray_MultiIter_NDIM(self)
   18824             :  */
   18825             : 
   18826             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
   18827             :   int __pyx_r;
   18828             : 
   18829             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
   18830             :  *         cdef inline int nd(self) noexcept nogil:
   18831             :  *             """The number of dimensions in the broadcasted result."""
   18832             :  *             return PyArray_MultiIter_NDIM(self)             # <<<<<<<<<<<<<<
   18833             :  * 
   18834             :  *         @property
   18835             :  */
   18836             :   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
   18837             :   goto __pyx_L0;
   18838             : 
   18839             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18840             :  * 
   18841             :  *         @property
   18842             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18843             :  *             """The number of dimensions in the broadcasted result."""
   18844             :  *             return PyArray_MultiIter_NDIM(self)
   18845             :  */
   18846             : 
   18847             :   /* function exit code */
   18848             :   __pyx_L0:;
   18849             :   return __pyx_r;
   18850             : }
   18851             : 
   18852             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18853             :  * 
   18854             :  *         @property
   18855             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18856             :  *             """The shape of the broadcasted result."""
   18857             :  *             return PyArray_MultiIter_DIMS(self)
   18858             :  */
   18859             : 
   18860             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
   18861             :   npy_intp *__pyx_r;
   18862             : 
   18863             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345
   18864             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:
   18865             :  *             """The shape of the broadcasted result."""
   18866             :  *             return PyArray_MultiIter_DIMS(self)             # <<<<<<<<<<<<<<
   18867             :  * 
   18868             :  *         @property
   18869             :  */
   18870             :   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
   18871             :   goto __pyx_L0;
   18872             : 
   18873             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18874             :  * 
   18875             :  *         @property
   18876             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18877             :  *             """The shape of the broadcasted result."""
   18878             :  *             return PyArray_MultiIter_DIMS(self)
   18879             :  */
   18880             : 
   18881             :   /* function exit code */
   18882             :   __pyx_L0:;
   18883             :   return __pyx_r;
   18884             : }
   18885             : 
   18886             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18887             :  * 
   18888             :  *         @property
   18889             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18890             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18891             :  *             On return, the iterators are adjusted for broadcasting."""
   18892             :  */
   18893             : 
   18894             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
   18895             :   void **__pyx_r;
   18896             : 
   18897             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351
   18898             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18899             :  *             On return, the iterators are adjusted for broadcasting."""
   18900             :  *             return PyArray_MultiIter_ITERS(self)             # <<<<<<<<<<<<<<
   18901             :  * 
   18902             :  * 
   18903             :  */
   18904             :   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
   18905             :   goto __pyx_L0;
   18906             : 
   18907             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18908             :  * 
   18909             :  *         @property
   18910             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18911             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18912             :  *             On return, the iterators are adjusted for broadcasting."""
   18913             :  */
   18914             : 
   18915             :   /* function exit code */
   18916             :   __pyx_L0:;
   18917             :   return __pyx_r;
   18918             : }
   18919             : 
   18920             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18921             :  * 
   18922             :  *         @property
   18923             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18924             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18925             :  *             """
   18926             :  */
   18927             : 
   18928             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
   18929             :   PyObject *__pyx_r;
   18930             : 
   18931             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369
   18932             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18933             :  *             """
   18934             :  *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
   18935             :  * 
   18936             :  *         @property
   18937             :  */
   18938             :   __pyx_r = PyArray_BASE(__pyx_v_self);
   18939             :   goto __pyx_L0;
   18940             : 
   18941             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18942             :  * 
   18943             :  *         @property
   18944             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18945             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18946             :  *             """
   18947             :  */
   18948             : 
   18949             :   /* function exit code */
   18950             :   __pyx_L0:;
   18951             :   return __pyx_r;
   18952             : }
   18953             : 
   18954             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18955             :  * 
   18956             :  *         @property
   18957             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18958             :  *             """Returns an owned reference to the dtype of the array.
   18959             :  *             """
   18960             :  */
   18961             : 
   18962             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
   18963             :   PyArray_Descr *__pyx_r = NULL;
   18964             :   __Pyx_RefNannyDeclarations
   18965             :   PyArray_Descr *__pyx_t_1;
   18966             :   __Pyx_RefNannySetupContext("descr", 1);
   18967             : 
   18968             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375
   18969             :  *             """Returns an owned reference to the dtype of the array.
   18970             :  *             """
   18971             :  *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
   18972             :  * 
   18973             :  *         @property
   18974             :  */
   18975             :   __Pyx_XDECREF((PyObject *)__pyx_r);
   18976             :   __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
   18977             :   __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
   18978             :   __pyx_r = ((PyArray_Descr *)__pyx_t_1);
   18979             :   goto __pyx_L0;
   18980             : 
   18981             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18982             :  * 
   18983             :  *         @property
   18984             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18985             :  *             """Returns an owned reference to the dtype of the array.
   18986             :  *             """
   18987             :  */
   18988             : 
   18989             :   /* function exit code */
   18990             :   __pyx_L0:;
   18991             :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   18992             :   __Pyx_RefNannyFinishContext();
   18993             :   return __pyx_r;
   18994             : }
   18995             : 
   18996             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   18997             :  * 
   18998             :  *         @property
   18999             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19000             :  *             """Returns the number of dimensions in the array.
   19001             :  *             """
   19002             :  */
   19003             : 
   19004             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
   19005             :   int __pyx_r;
   19006             : 
   19007             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381
   19008             :  *             """Returns the number of dimensions in the array.
   19009             :  *             """
   19010             :  *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
   19011             :  * 
   19012             :  *         @property
   19013             :  */
   19014             :   __pyx_r = PyArray_NDIM(__pyx_v_self);
   19015             :   goto __pyx_L0;
   19016             : 
   19017             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   19018             :  * 
   19019             :  *         @property
   19020             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19021             :  *             """Returns the number of dimensions in the array.
   19022             :  *             """
   19023             :  */
   19024             : 
   19025             :   /* function exit code */
   19026             :   __pyx_L0:;
   19027             :   return __pyx_r;
   19028             : }
   19029             : 
   19030             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   19031             :  * 
   19032             :  *         @property
   19033             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19034             :  *             """Returns a pointer to the dimensions/shape of the array.
   19035             :  *             The number of elements matches the number of dimensions of the array (ndim).
   19036             :  */
   19037             : 
   19038             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
   19039             :   npy_intp *__pyx_r;
   19040             : 
   19041             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389
   19042             :  *             Can return NULL for 0-dimensional arrays.
   19043             :  *             """
   19044             :  *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
   19045             :  * 
   19046             :  *         @property
   19047             :  */
   19048             :   __pyx_r = PyArray_DIMS(__pyx_v_self);
   19049             :   goto __pyx_L0;
   19050             : 
   19051             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   19052             :  * 
   19053             :  *         @property
   19054             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19055             :  *             """Returns a pointer to the dimensions/shape of the array.
   19056             :  *             The number of elements matches the number of dimensions of the array (ndim).
   19057             :  */
   19058             : 
   19059             :   /* function exit code */
   19060             :   __pyx_L0:;
   19061             :   return __pyx_r;
   19062             : }
   19063             : 
   19064             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   19065             :  * 
   19066             :  *         @property
   19067             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19068             :  *             """Returns a pointer to the strides of the array.
   19069             :  *             The number of elements matches the number of dimensions of the array (ndim).
   19070             :  */
   19071             : 
   19072             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
   19073             :   npy_intp *__pyx_r;
   19074             : 
   19075             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396
   19076             :  *             The number of elements matches the number of dimensions of the array (ndim).
   19077             :  *             """
   19078             :  *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
   19079             :  * 
   19080             :  *         @property
   19081             :  */
   19082             :   __pyx_r = PyArray_STRIDES(__pyx_v_self);
   19083             :   goto __pyx_L0;
   19084             : 
   19085             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   19086             :  * 
   19087             :  *         @property
   19088             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19089             :  *             """Returns a pointer to the strides of the array.
   19090             :  *             The number of elements matches the number of dimensions of the array (ndim).
   19091             :  */
   19092             : 
   19093             :   /* function exit code */
   19094             :   __pyx_L0:;
   19095             :   return __pyx_r;
   19096             : }
   19097             : 
   19098             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   19099             :  * 
   19100             :  *         @property
   19101             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19102             :  *             """Returns the total size (in number of elements) of the array.
   19103             :  *             """
   19104             :  */
   19105             : 
   19106             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
   19107             :   npy_intp __pyx_r;
   19108             : 
   19109             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402
   19110             :  *             """Returns the total size (in number of elements) of the array.
   19111             :  *             """
   19112             :  *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
   19113             :  * 
   19114             :  *         @property
   19115             :  */
   19116             :   __pyx_r = PyArray_SIZE(__pyx_v_self);
   19117             :   goto __pyx_L0;
   19118             : 
   19119             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   19120             :  * 
   19121             :  *         @property
   19122             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19123             :  *             """Returns the total size (in number of elements) of the array.
   19124             :  *             """
   19125             :  */
   19126             : 
   19127             :   /* function exit code */
   19128             :   __pyx_L0:;
   19129             :   return __pyx_r;
   19130             : }
   19131             : 
   19132             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   19133             :  * 
   19134             :  *         @property
   19135             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19136             :  *             """The pointer to the data buffer as a char*.
   19137             :  *             This is provided for legacy reasons to avoid direct struct field access.
   19138             :  */
   19139             : 
   19140             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
   19141             :   char *__pyx_r;
   19142             : 
   19143             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411
   19144             :  *             of `PyArray_DATA()` instead, which returns a 'void*'.
   19145             :  *             """
   19146             :  *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
   19147             :  * 
   19148             :  * 
   19149             :  */
   19150             :   __pyx_r = PyArray_BYTES(__pyx_v_self);
   19151             :   goto __pyx_L0;
   19152             : 
   19153             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   19154             :  * 
   19155             :  *         @property
   19156             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   19157             :  *             """The pointer to the data buffer as a char*.
   19158             :  *             This is provided for legacy reasons to avoid direct struct field access.
   19159             :  */
   19160             : 
   19161             :   /* function exit code */
   19162             :   __pyx_L0:;
   19163             :   return __pyx_r;
   19164             : }
   19165             : 
   19166             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   19167             :  * ctypedef long double complex clongdouble_t
   19168             :  * 
   19169             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   19170             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19171             :  * 
   19172             :  */
   19173             : 
   19174             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
   19175             :   PyObject *__pyx_r = NULL;
   19176             :   __Pyx_RefNannyDeclarations
   19177             :   PyObject *__pyx_t_1 = NULL;
   19178             :   int __pyx_lineno = 0;
   19179             :   const char *__pyx_filename = NULL;
   19180             :   int __pyx_clineno = 0;
   19181             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);
   19182             : 
   19183             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807
   19184             :  * 
   19185             :  * cdef inline object PyArray_MultiIterNew1(a):
   19186             :  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
   19187             :  * 
   19188             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   19189             :  */
   19190             :   __Pyx_XDECREF(__pyx_r);
   19191             :   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error)
   19192             :   __Pyx_GOTREF(__pyx_t_1);
   19193             :   __pyx_r = __pyx_t_1;
   19194             :   __pyx_t_1 = 0;
   19195             :   goto __pyx_L0;
   19196             : 
   19197             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   19198             :  * ctypedef long double complex clongdouble_t
   19199             :  * 
   19200             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   19201             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19202             :  * 
   19203             :  */
   19204             : 
   19205             :   /* function exit code */
   19206             :   __pyx_L1_error:;
   19207             :   __Pyx_XDECREF(__pyx_t_1);
   19208             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19209             :   __pyx_r = 0;
   19210             :   __pyx_L0:;
   19211             :   __Pyx_XGIVEREF(__pyx_r);
   19212             :   __Pyx_RefNannyFinishContext();
   19213             :   return __pyx_r;
   19214             : }
   19215             : 
   19216             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19217             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19218             :  * 
   19219             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19220             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19221             :  * 
   19222             :  */
   19223             : 
   19224             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
   19225             :   PyObject *__pyx_r = NULL;
   19226             :   __Pyx_RefNannyDeclarations
   19227             :   PyObject *__pyx_t_1 = NULL;
   19228             :   int __pyx_lineno = 0;
   19229             :   const char *__pyx_filename = NULL;
   19230             :   int __pyx_clineno = 0;
   19231             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);
   19232             : 
   19233             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810
   19234             :  * 
   19235             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   19236             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
   19237             :  * 
   19238             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19239             :  */
   19240             :   __Pyx_XDECREF(__pyx_r);
   19241             :   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error)
   19242             :   __Pyx_GOTREF(__pyx_t_1);
   19243             :   __pyx_r = __pyx_t_1;
   19244             :   __pyx_t_1 = 0;
   19245             :   goto __pyx_L0;
   19246             : 
   19247             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19248             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19249             :  * 
   19250             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19251             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19252             :  * 
   19253             :  */
   19254             : 
   19255             :   /* function exit code */
   19256             :   __pyx_L1_error:;
   19257             :   __Pyx_XDECREF(__pyx_t_1);
   19258             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19259             :   __pyx_r = 0;
   19260             :   __pyx_L0:;
   19261             :   __Pyx_XGIVEREF(__pyx_r);
   19262             :   __Pyx_RefNannyFinishContext();
   19263             :   return __pyx_r;
   19264             : }
   19265             : 
   19266             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19267             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19268             :  * 
   19269             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19270             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19271             :  * 
   19272             :  */
   19273             : 
   19274             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
   19275             :   PyObject *__pyx_r = NULL;
   19276             :   __Pyx_RefNannyDeclarations
   19277             :   PyObject *__pyx_t_1 = NULL;
   19278             :   int __pyx_lineno = 0;
   19279             :   const char *__pyx_filename = NULL;
   19280             :   int __pyx_clineno = 0;
   19281             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);
   19282             : 
   19283             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813
   19284             :  * 
   19285             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19286             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
   19287             :  * 
   19288             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19289             :  */
   19290             :   __Pyx_XDECREF(__pyx_r);
   19291             :   __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 813, __pyx_L1_error)
   19292             :   __Pyx_GOTREF(__pyx_t_1);
   19293             :   __pyx_r = __pyx_t_1;
   19294             :   __pyx_t_1 = 0;
   19295             :   goto __pyx_L0;
   19296             : 
   19297             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19298             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19299             :  * 
   19300             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19301             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19302             :  * 
   19303             :  */
   19304             : 
   19305             :   /* function exit code */
   19306             :   __pyx_L1_error:;
   19307             :   __Pyx_XDECREF(__pyx_t_1);
   19308             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19309             :   __pyx_r = 0;
   19310             :   __pyx_L0:;
   19311             :   __Pyx_XGIVEREF(__pyx_r);
   19312             :   __Pyx_RefNannyFinishContext();
   19313             :   return __pyx_r;
   19314             : }
   19315             : 
   19316             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19317             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19318             :  * 
   19319             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19320             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19321             :  * 
   19322             :  */
   19323             : 
   19324             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
   19325             :   PyObject *__pyx_r = NULL;
   19326             :   __Pyx_RefNannyDeclarations
   19327             :   PyObject *__pyx_t_1 = NULL;
   19328             :   int __pyx_lineno = 0;
   19329             :   const char *__pyx_filename = NULL;
   19330             :   int __pyx_clineno = 0;
   19331             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);
   19332             : 
   19333             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816
   19334             :  * 
   19335             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19336             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
   19337             :  * 
   19338             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19339             :  */
   19340             :   __Pyx_XDECREF(__pyx_r);
   19341             :   __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error)
   19342             :   __Pyx_GOTREF(__pyx_t_1);
   19343             :   __pyx_r = __pyx_t_1;
   19344             :   __pyx_t_1 = 0;
   19345             :   goto __pyx_L0;
   19346             : 
   19347             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19348             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19349             :  * 
   19350             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19351             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19352             :  * 
   19353             :  */
   19354             : 
   19355             :   /* function exit code */
   19356             :   __pyx_L1_error:;
   19357             :   __Pyx_XDECREF(__pyx_t_1);
   19358             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19359             :   __pyx_r = 0;
   19360             :   __pyx_L0:;
   19361             :   __Pyx_XGIVEREF(__pyx_r);
   19362             :   __Pyx_RefNannyFinishContext();
   19363             :   return __pyx_r;
   19364             : }
   19365             : 
   19366             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19367             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19368             :  * 
   19369             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19370             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19371             :  * 
   19372             :  */
   19373             : 
   19374             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
   19375             :   PyObject *__pyx_r = NULL;
   19376             :   __Pyx_RefNannyDeclarations
   19377             :   PyObject *__pyx_t_1 = NULL;
   19378             :   int __pyx_lineno = 0;
   19379             :   const char *__pyx_filename = NULL;
   19380             :   int __pyx_clineno = 0;
   19381             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);
   19382             : 
   19383             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819
   19384             :  * 
   19385             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19386             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
   19387             :  * 
   19388             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19389             :  */
   19390             :   __Pyx_XDECREF(__pyx_r);
   19391             :   __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error)
   19392             :   __Pyx_GOTREF(__pyx_t_1);
   19393             :   __pyx_r = __pyx_t_1;
   19394             :   __pyx_t_1 = 0;
   19395             :   goto __pyx_L0;
   19396             : 
   19397             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19398             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19399             :  * 
   19400             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19401             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19402             :  * 
   19403             :  */
   19404             : 
   19405             :   /* function exit code */
   19406             :   __pyx_L1_error:;
   19407             :   __Pyx_XDECREF(__pyx_t_1);
   19408             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19409             :   __pyx_r = 0;
   19410             :   __pyx_L0:;
   19411             :   __Pyx_XGIVEREF(__pyx_r);
   19412             :   __Pyx_RefNannyFinishContext();
   19413             :   return __pyx_r;
   19414             : }
   19415             : 
   19416             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19417             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19418             :  * 
   19419             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19420             :  *     if PyDataType_HASSUBARRAY(d):
   19421             :  *         return <tuple>d.subarray.shape
   19422             :  */
   19423             : 
   19424             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
   19425             :   PyObject *__pyx_r = NULL;
   19426             :   __Pyx_RefNannyDeclarations
   19427             :   int __pyx_t_1;
   19428             :   PyObject *__pyx_t_2;
   19429             :   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);
   19430             : 
   19431             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19432             :  * 
   19433             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19434             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19435             :  *         return <tuple>d.subarray.shape
   19436             :  *     else:
   19437             :  */
   19438             :   __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
   19439             :   if (__pyx_t_1) {
   19440             : 
   19441             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823
   19442             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19443             :  *     if PyDataType_HASSUBARRAY(d):
   19444             :  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
   19445             :  *     else:
   19446             :  *         return ()
   19447             :  */
   19448             :     __Pyx_XDECREF(__pyx_r);
   19449             :     __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
   19450             :     __Pyx_INCREF(((PyObject*)__pyx_t_2));
   19451             :     __pyx_r = ((PyObject*)__pyx_t_2);
   19452             :     goto __pyx_L0;
   19453             : 
   19454             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19455             :  * 
   19456             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19457             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19458             :  *         return <tuple>d.subarray.shape
   19459             :  *     else:
   19460             :  */
   19461             :   }
   19462             : 
   19463             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825
   19464             :  *         return <tuple>d.subarray.shape
   19465             :  *     else:
   19466             :  *         return ()             # <<<<<<<<<<<<<<
   19467             :  * 
   19468             :  * 
   19469             :  */
   19470             :   /*else*/ {
   19471             :     __Pyx_XDECREF(__pyx_r);
   19472             :     __Pyx_INCREF(__pyx_empty_tuple);
   19473             :     __pyx_r = __pyx_empty_tuple;
   19474             :     goto __pyx_L0;
   19475             :   }
   19476             : 
   19477             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19478             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19479             :  * 
   19480             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19481             :  *     if PyDataType_HASSUBARRAY(d):
   19482             :  *         return <tuple>d.subarray.shape
   19483             :  */
   19484             : 
   19485             :   /* function exit code */
   19486             :   __pyx_L0:;
   19487             :   __Pyx_XGIVEREF(__pyx_r);
   19488             :   __Pyx_RefNannyFinishContext();
   19489             :   return __pyx_r;
   19490             : }
   19491             : 
   19492             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19493             :  *     int _import_umath() except -1
   19494             :  * 
   19495             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19496             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19497             :  *     PyArray_SetBaseObject(arr, base)
   19498             :  */
   19499             : 
   19500             : static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
   19501             :   int __pyx_t_1;
   19502             :   int __pyx_lineno = 0;
   19503             :   const char *__pyx_filename = NULL;
   19504             :   int __pyx_clineno = 0;
   19505             : 
   19506             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
   19507             :  * 
   19508             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19509             :  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
   19510             :  *     PyArray_SetBaseObject(arr, base)
   19511             :  * 
   19512             :  */
   19513             :   Py_INCREF(__pyx_v_base);
   19514             : 
   19515             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011
   19516             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19517             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19518             :  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
   19519             :  * 
   19520             :  * cdef inline object get_array_base(ndarray arr):
   19521             :  */
   19522             :   __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error)
   19523             : 
   19524             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19525             :  *     int _import_umath() except -1
   19526             :  * 
   19527             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19528             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19529             :  *     PyArray_SetBaseObject(arr, base)
   19530             :  */
   19531             : 
   19532             :   /* function exit code */
   19533             :   goto __pyx_L0;
   19534             :   __pyx_L1_error:;
   19535             :   __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19536             :   __pyx_L0:;
   19537             : }
   19538             : 
   19539             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19540             :  *     PyArray_SetBaseObject(arr, base)
   19541             :  * 
   19542             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19543             :  *     base = PyArray_BASE(arr)
   19544             :  *     if base is NULL:
   19545             :  */
   19546             : 
   19547             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
   19548             :   PyObject *__pyx_v_base;
   19549             :   PyObject *__pyx_r = NULL;
   19550             :   __Pyx_RefNannyDeclarations
   19551             :   int __pyx_t_1;
   19552             :   __Pyx_RefNannySetupContext("get_array_base", 1);
   19553             : 
   19554             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
   19555             :  * 
   19556             :  * cdef inline object get_array_base(ndarray arr):
   19557             :  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
   19558             :  *     if base is NULL:
   19559             :  *         return None
   19560             :  */
   19561             :   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
   19562             : 
   19563             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19564             :  * cdef inline object get_array_base(ndarray arr):
   19565             :  *     base = PyArray_BASE(arr)
   19566             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19567             :  *         return None
   19568             :  *     return <object>base
   19569             :  */
   19570             :   __pyx_t_1 = (__pyx_v_base == NULL);
   19571             :   if (__pyx_t_1) {
   19572             : 
   19573             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
   19574             :  *     base = PyArray_BASE(arr)
   19575             :  *     if base is NULL:
   19576             :  *         return None             # <<<<<<<<<<<<<<
   19577             :  *     return <object>base
   19578             :  * 
   19579             :  */
   19580             :     __Pyx_XDECREF(__pyx_r);
   19581             :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   19582             :     goto __pyx_L0;
   19583             : 
   19584             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19585             :  * cdef inline object get_array_base(ndarray arr):
   19586             :  *     base = PyArray_BASE(arr)
   19587             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19588             :  *         return None
   19589             :  *     return <object>base
   19590             :  */
   19591             :   }
   19592             : 
   19593             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017
   19594             :  *     if base is NULL:
   19595             :  *         return None
   19596             :  *     return <object>base             # <<<<<<<<<<<<<<
   19597             :  * 
   19598             :  * # Versions of the import_* functions which are more suitable for
   19599             :  */
   19600             :   __Pyx_XDECREF(__pyx_r);
   19601             :   __Pyx_INCREF(((PyObject *)__pyx_v_base));
   19602             :   __pyx_r = ((PyObject *)__pyx_v_base);
   19603             :   goto __pyx_L0;
   19604             : 
   19605             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19606             :  *     PyArray_SetBaseObject(arr, base)
   19607             :  * 
   19608             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19609             :  *     base = PyArray_BASE(arr)
   19610             :  *     if base is NULL:
   19611             :  */
   19612             : 
   19613             :   /* function exit code */
   19614             :   __pyx_L0:;
   19615             :   __Pyx_XGIVEREF(__pyx_r);
   19616             :   __Pyx_RefNannyFinishContext();
   19617             :   return __pyx_r;
   19618             : }
   19619             : 
   19620             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19621             :  * # Versions of the import_* functions which are more suitable for
   19622             :  * # Cython code.
   19623             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19624             :  *     try:
   19625             :  *         __pyx_import_array()
   19626             :  */
   19627             : 
   19628           3 : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
   19629           3 :   int __pyx_r;
   19630             :   __Pyx_RefNannyDeclarations
   19631           3 :   PyObject *__pyx_t_1 = NULL;
   19632           3 :   PyObject *__pyx_t_2 = NULL;
   19633           3 :   PyObject *__pyx_t_3 = NULL;
   19634           3 :   int __pyx_t_4;
   19635           3 :   PyObject *__pyx_t_5 = NULL;
   19636           3 :   PyObject *__pyx_t_6 = NULL;
   19637           3 :   PyObject *__pyx_t_7 = NULL;
   19638           3 :   PyObject *__pyx_t_8 = NULL;
   19639           3 :   int __pyx_lineno = 0;
   19640           3 :   const char *__pyx_filename = NULL;
   19641           3 :   int __pyx_clineno = 0;
   19642           3 :   __Pyx_RefNannySetupContext("import_array", 1);
   19643             : 
   19644             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19645             :  * # Cython code.
   19646             :  * cdef inline int import_array() except -1:
   19647             :  *     try:             # <<<<<<<<<<<<<<
   19648             :  *         __pyx_import_array()
   19649             :  *     except Exception:
   19650             :  */
   19651             :   {
   19652           3 :     __Pyx_PyThreadState_declare
   19653           3 :     __Pyx_PyThreadState_assign
   19654           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19655           3 :     __Pyx_XGOTREF(__pyx_t_1);
   19656           3 :     __Pyx_XGOTREF(__pyx_t_2);
   19657           3 :     __Pyx_XGOTREF(__pyx_t_3);
   19658             :     /*try:*/ {
   19659             : 
   19660             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023
   19661             :  * cdef inline int import_array() except -1:
   19662             :  *     try:
   19663             :  *         __pyx_import_array()             # <<<<<<<<<<<<<<
   19664             :  *     except Exception:
   19665             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19666             :  */
   19667           3 :       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error)
   19668             : 
   19669             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19670             :  * # Cython code.
   19671             :  * cdef inline int import_array() except -1:
   19672             :  *     try:             # <<<<<<<<<<<<<<
   19673             :  *         __pyx_import_array()
   19674             :  *     except Exception:
   19675             :  */
   19676             :     }
   19677           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19678           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19679           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19680           3 :     goto __pyx_L8_try_end;
   19681           0 :     __pyx_L3_error:;
   19682             : 
   19683             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024
   19684             :  *     try:
   19685             :  *         __pyx_import_array()
   19686             :  *     except Exception:             # <<<<<<<<<<<<<<
   19687             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19688             :  * 
   19689             :  */
   19690           0 :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19691           0 :     if (__pyx_t_4) {
   19692           0 :       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19693           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error)
   19694           0 :       __Pyx_XGOTREF(__pyx_t_5);
   19695           0 :       __Pyx_XGOTREF(__pyx_t_6);
   19696           0 :       __Pyx_XGOTREF(__pyx_t_7);
   19697             : 
   19698             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   19699             :  *         __pyx_import_array()
   19700             :  *     except Exception:
   19701             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   19702             :  * 
   19703             :  * cdef inline int import_umath() except -1:
   19704             :  */
   19705           0 :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19706           0 :       __Pyx_GOTREF(__pyx_t_8);
   19707           0 :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19708           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19709           0 :       __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19710             :     }
   19711           0 :     goto __pyx_L5_except_error;
   19712             : 
   19713             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19714             :  * # Cython code.
   19715             :  * cdef inline int import_array() except -1:
   19716             :  *     try:             # <<<<<<<<<<<<<<
   19717             :  *         __pyx_import_array()
   19718             :  *     except Exception:
   19719             :  */
   19720           0 :     __pyx_L5_except_error:;
   19721           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   19722           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   19723           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   19724           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19725           0 :     goto __pyx_L1_error;
   19726           3 :     __pyx_L8_try_end:;
   19727             :   }
   19728             : 
   19729             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19730             :  * # Versions of the import_* functions which are more suitable for
   19731             :  * # Cython code.
   19732             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19733             :  *     try:
   19734             :  *         __pyx_import_array()
   19735             :  */
   19736             : 
   19737             :   /* function exit code */
   19738           3 :   __pyx_r = 0;
   19739           3 :   goto __pyx_L0;
   19740           0 :   __pyx_L1_error:;
   19741           0 :   __Pyx_XDECREF(__pyx_t_5);
   19742           0 :   __Pyx_XDECREF(__pyx_t_6);
   19743           0 :   __Pyx_XDECREF(__pyx_t_7);
   19744           0 :   __Pyx_XDECREF(__pyx_t_8);
   19745           0 :   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19746           0 :   __pyx_r = -1;
   19747           3 :   __pyx_L0:;
   19748           3 :   __Pyx_RefNannyFinishContext();
   19749           3 :   return __pyx_r;
   19750             : }
   19751             : 
   19752             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19753             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19754             :  * 
   19755             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19756             :  *     try:
   19757             :  *         _import_umath()
   19758             :  */
   19759             : 
   19760             : static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
   19761             :   int __pyx_r;
   19762             :   __Pyx_RefNannyDeclarations
   19763             :   PyObject *__pyx_t_1 = NULL;
   19764             :   PyObject *__pyx_t_2 = NULL;
   19765             :   PyObject *__pyx_t_3 = NULL;
   19766             :   int __pyx_t_4;
   19767             :   PyObject *__pyx_t_5 = NULL;
   19768             :   PyObject *__pyx_t_6 = NULL;
   19769             :   PyObject *__pyx_t_7 = NULL;
   19770             :   PyObject *__pyx_t_8 = NULL;
   19771             :   int __pyx_lineno = 0;
   19772             :   const char *__pyx_filename = NULL;
   19773             :   int __pyx_clineno = 0;
   19774             :   __Pyx_RefNannySetupContext("import_umath", 1);
   19775             : 
   19776             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19777             :  * 
   19778             :  * cdef inline int import_umath() except -1:
   19779             :  *     try:             # <<<<<<<<<<<<<<
   19780             :  *         _import_umath()
   19781             :  *     except Exception:
   19782             :  */
   19783             :   {
   19784             :     __Pyx_PyThreadState_declare
   19785             :     __Pyx_PyThreadState_assign
   19786             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19787             :     __Pyx_XGOTREF(__pyx_t_1);
   19788             :     __Pyx_XGOTREF(__pyx_t_2);
   19789             :     __Pyx_XGOTREF(__pyx_t_3);
   19790             :     /*try:*/ {
   19791             : 
   19792             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
   19793             :  * cdef inline int import_umath() except -1:
   19794             :  *     try:
   19795             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19796             :  *     except Exception:
   19797             :  *         raise ImportError("numpy._core.umath failed to import")
   19798             :  */
   19799             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error)
   19800             : 
   19801             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19802             :  * 
   19803             :  * cdef inline int import_umath() except -1:
   19804             :  *     try:             # <<<<<<<<<<<<<<
   19805             :  *         _import_umath()
   19806             :  *     except Exception:
   19807             :  */
   19808             :     }
   19809             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19810             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19811             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19812             :     goto __pyx_L8_try_end;
   19813             :     __pyx_L3_error:;
   19814             : 
   19815             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030
   19816             :  *     try:
   19817             :  *         _import_umath()
   19818             :  *     except Exception:             # <<<<<<<<<<<<<<
   19819             :  *         raise ImportError("numpy._core.umath failed to import")
   19820             :  * 
   19821             :  */
   19822             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19823             :     if (__pyx_t_4) {
   19824             :       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19825             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error)
   19826             :       __Pyx_XGOTREF(__pyx_t_5);
   19827             :       __Pyx_XGOTREF(__pyx_t_6);
   19828             :       __Pyx_XGOTREF(__pyx_t_7);
   19829             : 
   19830             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   19831             :  *         _import_umath()
   19832             :  *     except Exception:
   19833             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19834             :  * 
   19835             :  * cdef inline int import_ufunc() except -1:
   19836             :  */
   19837             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19838             :       __Pyx_GOTREF(__pyx_t_8);
   19839             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19840             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19841             :       __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19842             :     }
   19843             :     goto __pyx_L5_except_error;
   19844             : 
   19845             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19846             :  * 
   19847             :  * cdef inline int import_umath() except -1:
   19848             :  *     try:             # <<<<<<<<<<<<<<
   19849             :  *         _import_umath()
   19850             :  *     except Exception:
   19851             :  */
   19852             :     __pyx_L5_except_error:;
   19853             :     __Pyx_XGIVEREF(__pyx_t_1);
   19854             :     __Pyx_XGIVEREF(__pyx_t_2);
   19855             :     __Pyx_XGIVEREF(__pyx_t_3);
   19856             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19857             :     goto __pyx_L1_error;
   19858             :     __pyx_L8_try_end:;
   19859             :   }
   19860             : 
   19861             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19862             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19863             :  * 
   19864             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19865             :  *     try:
   19866             :  *         _import_umath()
   19867             :  */
   19868             : 
   19869             :   /* function exit code */
   19870             :   __pyx_r = 0;
   19871             :   goto __pyx_L0;
   19872             :   __pyx_L1_error:;
   19873             :   __Pyx_XDECREF(__pyx_t_5);
   19874             :   __Pyx_XDECREF(__pyx_t_6);
   19875             :   __Pyx_XDECREF(__pyx_t_7);
   19876             :   __Pyx_XDECREF(__pyx_t_8);
   19877             :   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19878             :   __pyx_r = -1;
   19879             :   __pyx_L0:;
   19880             :   __Pyx_RefNannyFinishContext();
   19881             :   return __pyx_r;
   19882             : }
   19883             : 
   19884             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19885             :  *         raise ImportError("numpy._core.umath failed to import")
   19886             :  * 
   19887             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19888             :  *     try:
   19889             :  *         _import_umath()
   19890             :  */
   19891             : 
   19892             : static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
   19893             :   int __pyx_r;
   19894             :   __Pyx_RefNannyDeclarations
   19895             :   PyObject *__pyx_t_1 = NULL;
   19896             :   PyObject *__pyx_t_2 = NULL;
   19897             :   PyObject *__pyx_t_3 = NULL;
   19898             :   int __pyx_t_4;
   19899             :   PyObject *__pyx_t_5 = NULL;
   19900             :   PyObject *__pyx_t_6 = NULL;
   19901             :   PyObject *__pyx_t_7 = NULL;
   19902             :   PyObject *__pyx_t_8 = NULL;
   19903             :   int __pyx_lineno = 0;
   19904             :   const char *__pyx_filename = NULL;
   19905             :   int __pyx_clineno = 0;
   19906             :   __Pyx_RefNannySetupContext("import_ufunc", 1);
   19907             : 
   19908             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19909             :  * 
   19910             :  * cdef inline int import_ufunc() except -1:
   19911             :  *     try:             # <<<<<<<<<<<<<<
   19912             :  *         _import_umath()
   19913             :  *     except Exception:
   19914             :  */
   19915             :   {
   19916             :     __Pyx_PyThreadState_declare
   19917             :     __Pyx_PyThreadState_assign
   19918             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19919             :     __Pyx_XGOTREF(__pyx_t_1);
   19920             :     __Pyx_XGOTREF(__pyx_t_2);
   19921             :     __Pyx_XGOTREF(__pyx_t_3);
   19922             :     /*try:*/ {
   19923             : 
   19924             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035
   19925             :  * cdef inline int import_ufunc() except -1:
   19926             :  *     try:
   19927             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19928             :  *     except Exception:
   19929             :  *         raise ImportError("numpy._core.umath failed to import")
   19930             :  */
   19931             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error)
   19932             : 
   19933             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19934             :  * 
   19935             :  * cdef inline int import_ufunc() except -1:
   19936             :  *     try:             # <<<<<<<<<<<<<<
   19937             :  *         _import_umath()
   19938             :  *     except Exception:
   19939             :  */
   19940             :     }
   19941             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19942             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19943             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19944             :     goto __pyx_L8_try_end;
   19945             :     __pyx_L3_error:;
   19946             : 
   19947             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036
   19948             :  *     try:
   19949             :  *         _import_umath()
   19950             :  *     except Exception:             # <<<<<<<<<<<<<<
   19951             :  *         raise ImportError("numpy._core.umath failed to import")
   19952             :  * 
   19953             :  */
   19954             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19955             :     if (__pyx_t_4) {
   19956             :       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19957             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error)
   19958             :       __Pyx_XGOTREF(__pyx_t_5);
   19959             :       __Pyx_XGOTREF(__pyx_t_6);
   19960             :       __Pyx_XGOTREF(__pyx_t_7);
   19961             : 
   19962             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
   19963             :  *         _import_umath()
   19964             :  *     except Exception:
   19965             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19966             :  * 
   19967             :  * 
   19968             :  */
   19969             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19970             :       __Pyx_GOTREF(__pyx_t_8);
   19971             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19972             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19973             :       __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19974             :     }
   19975             :     goto __pyx_L5_except_error;
   19976             : 
   19977             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19978             :  * 
   19979             :  * cdef inline int import_ufunc() except -1:
   19980             :  *     try:             # <<<<<<<<<<<<<<
   19981             :  *         _import_umath()
   19982             :  *     except Exception:
   19983             :  */
   19984             :     __pyx_L5_except_error:;
   19985             :     __Pyx_XGIVEREF(__pyx_t_1);
   19986             :     __Pyx_XGIVEREF(__pyx_t_2);
   19987             :     __Pyx_XGIVEREF(__pyx_t_3);
   19988             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19989             :     goto __pyx_L1_error;
   19990             :     __pyx_L8_try_end:;
   19991             :   }
   19992             : 
   19993             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19994             :  *         raise ImportError("numpy._core.umath failed to import")
   19995             :  * 
   19996             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19997             :  *     try:
   19998             :  *         _import_umath()
   19999             :  */
   20000             : 
   20001             :   /* function exit code */
   20002             :   __pyx_r = 0;
   20003             :   goto __pyx_L0;
   20004             :   __pyx_L1_error:;
   20005             :   __Pyx_XDECREF(__pyx_t_5);
   20006             :   __Pyx_XDECREF(__pyx_t_6);
   20007             :   __Pyx_XDECREF(__pyx_t_7);
   20008             :   __Pyx_XDECREF(__pyx_t_8);
   20009             :   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20010             :   __pyx_r = -1;
   20011             :   __pyx_L0:;
   20012             :   __Pyx_RefNannyFinishContext();
   20013             :   return __pyx_r;
   20014             : }
   20015             : 
   20016             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   20017             :  * 
   20018             :  * 
   20019             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   20020             :  *     """
   20021             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   20022             :  */
   20023             : 
   20024             : static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
   20025             :   int __pyx_r;
   20026             : 
   20027             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
   20028             :  *     bool
   20029             :  *     """
   20030             :  *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
   20031             :  * 
   20032             :  * 
   20033             :  */
   20034             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
   20035             :   goto __pyx_L0;
   20036             : 
   20037             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   20038             :  * 
   20039             :  * 
   20040             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   20041             :  *     """
   20042             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   20043             :  */
   20044             : 
   20045             :   /* function exit code */
   20046             :   __pyx_L0:;
   20047             :   return __pyx_r;
   20048             : }
   20049             : 
   20050             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   20051             :  * 
   20052             :  * 
   20053             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   20054             :  *     """
   20055             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   20056             :  */
   20057             : 
   20058             : static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
   20059             :   int __pyx_r;
   20060             : 
   20061             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067
   20062             :  *     bool
   20063             :  *     """
   20064             :  *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
   20065             :  * 
   20066             :  * 
   20067             :  */
   20068             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
   20069             :   goto __pyx_L0;
   20070             : 
   20071             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   20072             :  * 
   20073             :  * 
   20074             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   20075             :  *     """
   20076             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   20077             :  */
   20078             : 
   20079             :   /* function exit code */
   20080             :   __pyx_L0:;
   20081             :   return __pyx_r;
   20082             : }
   20083             : 
   20084             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   20085             :  * 
   20086             :  * 
   20087             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20088             :  *     """
   20089             :  *     returns the int64 value underlying scalar numpy datetime64 object
   20090             :  */
   20091             : 
   20092             : static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
   20093             :   npy_datetime __pyx_r;
   20094             : 
   20095             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077
   20096             :  *     also needed.  That can be found using `get_datetime64_unit`.
   20097             :  *     """
   20098             :  *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   20099             :  * 
   20100             :  * 
   20101             :  */
   20102             :   __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
   20103             :   goto __pyx_L0;
   20104             : 
   20105             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   20106             :  * 
   20107             :  * 
   20108             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20109             :  *     """
   20110             :  *     returns the int64 value underlying scalar numpy datetime64 object
   20111             :  */
   20112             : 
   20113             :   /* function exit code */
   20114             :   __pyx_L0:;
   20115             :   return __pyx_r;
   20116             : }
   20117             : 
   20118             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   20119             :  * 
   20120             :  * 
   20121             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20122             :  *     """
   20123             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   20124             :  */
   20125             : 
   20126             : static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
   20127             :   npy_timedelta __pyx_r;
   20128             : 
   20129             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084
   20130             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   20131             :  *     """
   20132             :  *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   20133             :  * 
   20134             :  * 
   20135             :  */
   20136             :   __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
   20137             :   goto __pyx_L0;
   20138             : 
   20139             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   20140             :  * 
   20141             :  * 
   20142             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20143             :  *     """
   20144             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   20145             :  */
   20146             : 
   20147             :   /* function exit code */
   20148             :   __pyx_L0:;
   20149             :   return __pyx_r;
   20150             : }
   20151             : 
   20152             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   20153             :  * 
   20154             :  * 
   20155             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20156             :  *     """
   20157             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   20158             :  */
   20159             : 
   20160             : static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
   20161             :   NPY_DATETIMEUNIT __pyx_r;
   20162             : 
   20163             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091
   20164             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   20165             :  *     """
   20166             :  *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
   20167             :  * 
   20168             :  * 
   20169             :  */
   20170             :   __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
   20171             :   goto __pyx_L0;
   20172             : 
   20173             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   20174             :  * 
   20175             :  * 
   20176             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   20177             :  *     """
   20178             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   20179             :  */
   20180             : 
   20181             :   /* function exit code */
   20182             :   __pyx_L0:;
   20183             :   return __pyx_r;
   20184             : }
   20185             : 
   20186             : /* "scipy/optimize/_trlib/_trlib.pyx":12
   20187             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   20188             :  * 
   20189             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,             # <<<<<<<<<<<<<<
   20190             :  *                  disp=False):
   20191             :  *         super().__init__(x, fun, jac, hess, hessp)
   20192             :  */
   20193             : 
   20194             : /* Python wrapper */
   20195             : static PyObject *__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_1__init__(PyObject *__pyx_self, 
   20196             : #if CYTHON_METH_FASTCALL
   20197             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20198             : #else
   20199             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20200             : #endif
   20201             : ); /*proto*/
   20202             : static PyMethodDef __pyx_mdef_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   20203         208 : static PyObject *__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_1__init__(PyObject *__pyx_self, 
   20204             : #if CYTHON_METH_FASTCALL
   20205             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20206             : #else
   20207             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20208             : #endif
   20209             : ) {
   20210         208 :   PyObject *__pyx_v_self = 0;
   20211         208 :   PyObject *__pyx_v_x = 0;
   20212         208 :   PyObject *__pyx_v_fun = 0;
   20213         208 :   PyObject *__pyx_v_jac = 0;
   20214         208 :   PyObject *__pyx_v_hess = 0;
   20215         208 :   PyObject *__pyx_v_hessp = 0;
   20216         208 :   PyObject *__pyx_v_tol_rel_i = 0;
   20217         208 :   PyObject *__pyx_v_tol_rel_b = 0;
   20218         208 :   PyObject *__pyx_v_disp = 0;
   20219             :   #if !CYTHON_METH_FASTCALL
   20220             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   20221             :   #endif
   20222         208 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   20223         208 :   PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
   20224         208 :   int __pyx_lineno = 0;
   20225         208 :   const char *__pyx_filename = NULL;
   20226         208 :   int __pyx_clineno = 0;
   20227         208 :   PyObject *__pyx_r = 0;
   20228             :   __Pyx_RefNannyDeclarations
   20229         208 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   20230             :   #if !CYTHON_METH_FASTCALL
   20231             :   #if CYTHON_ASSUME_SAFE_MACROS
   20232             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   20233             :   #else
   20234             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   20235             :   #endif
   20236             :   #endif
   20237         208 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   20238             :   {
   20239         208 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_x,&__pyx_n_s_fun,&__pyx_n_s_jac,&__pyx_n_s_hess,&__pyx_n_s_hessp,&__pyx_n_s_tol_rel_i,&__pyx_n_s_tol_rel_b,&__pyx_n_s_disp,0};
   20240         208 :     values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_neg_2_0)));
   20241         208 :     values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_neg_3_0)));
   20242             : 
   20243             :     /* "scipy/optimize/_trlib/_trlib.pyx":13
   20244             :  * 
   20245             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,
   20246             :  *                  disp=False):             # <<<<<<<<<<<<<<
   20247             :  *         super().__init__(x, fun, jac, hess, hessp)
   20248             :  *         self.tol_rel_i = tol_rel_i
   20249             :  */
   20250         208 :     values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
   20251         208 :     if (__pyx_kwds) {
   20252         208 :       Py_ssize_t kw_args;
   20253         208 :       switch (__pyx_nargs) {
   20254           0 :         case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
   20255           0 :         CYTHON_FALLTHROUGH;
   20256           0 :         case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
   20257           0 :         CYTHON_FALLTHROUGH;
   20258           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   20259         208 :         CYTHON_FALLTHROUGH;
   20260         208 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   20261         208 :         CYTHON_FALLTHROUGH;
   20262         208 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   20263         208 :         CYTHON_FALLTHROUGH;
   20264         208 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   20265         208 :         CYTHON_FALLTHROUGH;
   20266         208 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   20267         208 :         CYTHON_FALLTHROUGH;
   20268         208 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20269         208 :         CYTHON_FALLTHROUGH;
   20270         208 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20271         208 :         CYTHON_FALLTHROUGH;
   20272         208 :         case  0: break;
   20273           0 :         default: goto __pyx_L5_argtuple_error;
   20274             :       }
   20275         208 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   20276         208 :       switch (__pyx_nargs) {
   20277           0 :         case  0:
   20278           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   20279           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   20280           0 :           kw_args--;
   20281             :         }
   20282           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20283           0 :         else goto __pyx_L5_argtuple_error;
   20284           0 :         CYTHON_FALLTHROUGH;
   20285             :         case  1:
   20286           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
   20287           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   20288           0 :           kw_args--;
   20289             :         }
   20290           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20291             :         else {
   20292           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, 1); __PYX_ERR(0, 12, __pyx_L3_error)
   20293             :         }
   20294           0 :         CYTHON_FALLTHROUGH;
   20295             :         case  2:
   20296           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fun)) != 0)) {
   20297           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   20298           0 :           kw_args--;
   20299             :         }
   20300           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20301             :         else {
   20302           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, 2); __PYX_ERR(0, 12, __pyx_L3_error)
   20303             :         }
   20304           0 :         CYTHON_FALLTHROUGH;
   20305             :         case  3:
   20306           0 :         if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_jac)) != 0)) {
   20307           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
   20308           0 :           kw_args--;
   20309             :         }
   20310           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20311             :         else {
   20312           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, 3); __PYX_ERR(0, 12, __pyx_L3_error)
   20313             :         }
   20314           0 :         CYTHON_FALLTHROUGH;
   20315             :         case  4:
   20316           0 :         if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hess)) != 0)) {
   20317           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[4]);
   20318           0 :           kw_args--;
   20319             :         }
   20320           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20321             :         else {
   20322           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, 4); __PYX_ERR(0, 12, __pyx_L3_error)
   20323             :         }
   20324           0 :         CYTHON_FALLTHROUGH;
   20325             :         case  5:
   20326           0 :         if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_hessp)) != 0)) {
   20327           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[5]);
   20328           0 :           kw_args--;
   20329             :         }
   20330           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20331             :         else {
   20332           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, 5); __PYX_ERR(0, 12, __pyx_L3_error)
   20333             :         }
   20334         208 :         CYTHON_FALLTHROUGH;
   20335             :         case  6:
   20336         208 :         if (kw_args > 0) {
   20337         208 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tol_rel_i);
   20338         208 :           if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   20339           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20340             :         }
   20341         208 :         CYTHON_FALLTHROUGH;
   20342             :         case  7:
   20343         208 :         if (kw_args > 0) {
   20344         208 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tol_rel_b);
   20345         208 :           if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   20346           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20347             :         }
   20348         208 :         CYTHON_FALLTHROUGH;
   20349             :         case  8:
   20350         208 :         if (kw_args > 0) {
   20351         208 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_disp);
   20352         208 :           if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   20353           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 12, __pyx_L3_error)
   20354             :         }
   20355             :       }
   20356         208 :       if (unlikely(kw_args > 0)) {
   20357           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   20358           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 12, __pyx_L3_error)
   20359             :       }
   20360             :     } else {
   20361           0 :       switch (__pyx_nargs) {
   20362           0 :         case  9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
   20363           0 :         CYTHON_FALLTHROUGH;
   20364           0 :         case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
   20365           0 :         CYTHON_FALLTHROUGH;
   20366           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   20367           0 :         CYTHON_FALLTHROUGH;
   20368           0 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   20369           0 :         values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   20370           0 :         values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   20371           0 :         values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   20372           0 :         values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20373           0 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20374           0 :         break;
   20375           0 :         default: goto __pyx_L5_argtuple_error;
   20376             :       }
   20377             :     }
   20378         208 :     __pyx_v_self = values[0];
   20379         208 :     __pyx_v_x = values[1];
   20380         208 :     __pyx_v_fun = values[2];
   20381         208 :     __pyx_v_jac = values[3];
   20382         208 :     __pyx_v_hess = values[4];
   20383         208 :     __pyx_v_hessp = values[5];
   20384         208 :     __pyx_v_tol_rel_i = values[6];
   20385         208 :     __pyx_v_tol_rel_b = values[7];
   20386         208 :     __pyx_v_disp = values[8];
   20387             :   }
   20388         208 :   goto __pyx_L6_skip;
   20389           0 :   __pyx_L5_argtuple_error:;
   20390           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 9, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error)
   20391         208 :   __pyx_L6_skip:;
   20392         208 :   goto __pyx_L4_argument_unpacking_done;
   20393           0 :   __pyx_L3_error:;
   20394             :   {
   20395           0 :     Py_ssize_t __pyx_temp;
   20396           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20397             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20398             :     }
   20399             :   }
   20400           0 :   __Pyx_AddTraceback("scipy.optimize._trlib._trlib.TRLIBQuadraticSubproblem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20401           0 :   __Pyx_RefNannyFinishContext();
   20402           0 :   return NULL;
   20403         208 :   __pyx_L4_argument_unpacking_done:;
   20404         208 :   __pyx_r = __pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem___init__(__pyx_self, __pyx_v_self, __pyx_v_x, __pyx_v_fun, __pyx_v_jac, __pyx_v_hess, __pyx_v_hessp, __pyx_v_tol_rel_i, __pyx_v_tol_rel_b, __pyx_v_disp);
   20405             : 
   20406             :   /* "scipy/optimize/_trlib/_trlib.pyx":12
   20407             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   20408             :  * 
   20409             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,             # <<<<<<<<<<<<<<
   20410             :  *                  disp=False):
   20411             :  *         super().__init__(x, fun, jac, hess, hessp)
   20412             :  */
   20413             : 
   20414             :   /* function exit code */
   20415             :   {
   20416         208 :     Py_ssize_t __pyx_temp;
   20417         208 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20418             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20419             :     }
   20420             :   }
   20421             :   __Pyx_RefNannyFinishContext();
   20422             :   return __pyx_r;
   20423             : }
   20424             : 
   20425         208 : static PyObject *__pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_fun, PyObject *__pyx_v_jac, PyObject *__pyx_v_hess, PyObject *__pyx_v_hessp, PyObject *__pyx_v_tol_rel_i, PyObject *__pyx_v_tol_rel_b, PyObject *__pyx_v_disp) {
   20426         208 :   long __pyx_v_itmax;
   20427         208 :   long __pyx_v_iwork_size;
   20428         208 :   long __pyx_v_fwork_size;
   20429         208 :   long __pyx_v_h_pointer;
   20430         208 :   __Pyx_memviewslice __pyx_v_fwork_view = { 0, 0, { 0 }, { 0 }, { 0 } };
   20431         208 :   double *__pyx_v_fwork_ptr;
   20432         208 :   PyObject *__pyx_r = NULL;
   20433             :   __Pyx_RefNannyDeclarations
   20434         208 :   PyObject *__pyx_t_1 = NULL;
   20435         208 :   PyObject *__pyx_t_2 = NULL;
   20436         208 :   PyObject *__pyx_t_3 = NULL;
   20437         208 :   unsigned int __pyx_t_4;
   20438         208 :   PyObject *__pyx_t_5 = NULL;
   20439         208 :   int __pyx_t_6;
   20440         208 :   long __pyx_t_7;
   20441         208 :   __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
   20442         208 :   Py_ssize_t __pyx_t_9;
   20443         208 :   int __pyx_t_10;
   20444         208 :   PyObject *__pyx_t_11 = NULL;
   20445         208 :   int __pyx_lineno = 0;
   20446         208 :   const char *__pyx_filename = NULL;
   20447         208 :   int __pyx_clineno = 0;
   20448         208 :   __Pyx_RefNannySetupContext("__init__", 1);
   20449             : 
   20450             :   /* "scipy/optimize/_trlib/_trlib.pyx":14
   20451             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,
   20452             :  *                  disp=False):
   20453             :  *         super().__init__(x, fun, jac, hess, hessp)             # <<<<<<<<<<<<<<
   20454             :  *         self.tol_rel_i = tol_rel_i
   20455             :  *         self.tol_rel_b = tol_rel_b
   20456             :  */
   20457         208 :   __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self);
   20458         208 :   if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 14, __pyx_L1_error) }
   20459         208 :   __Pyx_INCREF(__pyx_t_2);
   20460         208 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
   20461         208 :   __Pyx_GOTREF(__pyx_t_3);
   20462         208 :   __Pyx_GIVEREF(__pyx_t_2);
   20463         208 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error);
   20464         208 :   __Pyx_INCREF(__pyx_v_self);
   20465         208 :   __Pyx_GIVEREF(__pyx_v_self);
   20466         208 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)) __PYX_ERR(0, 14, __pyx_L1_error);
   20467         208 :   __pyx_t_2 = 0;
   20468         208 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
   20469         208 :   __Pyx_GOTREF(__pyx_t_2);
   20470         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20471         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
   20472         208 :   __Pyx_GOTREF(__pyx_t_3);
   20473         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20474         208 :   __pyx_t_2 = NULL;
   20475         208 :   __pyx_t_4 = 0;
   20476             :   #if CYTHON_UNPACK_METHODS
   20477         208 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   20478         208 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   20479         208 :     if (likely(__pyx_t_2)) {
   20480         208 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20481         208 :       __Pyx_INCREF(__pyx_t_2);
   20482         208 :       __Pyx_INCREF(function);
   20483         208 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20484             :       __pyx_t_4 = 1;
   20485             :     }
   20486             :   }
   20487             :   #endif
   20488             :   {
   20489         208 :     PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_v_x, __pyx_v_fun, __pyx_v_jac, __pyx_v_hess, __pyx_v_hessp};
   20490         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 5+__pyx_t_4);
   20491         208 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   20492         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
   20493         208 :     __Pyx_GOTREF(__pyx_t_1);
   20494         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20495             :   }
   20496         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20497             : 
   20498             :   /* "scipy/optimize/_trlib/_trlib.pyx":15
   20499             :  *                  disp=False):
   20500             :  *         super().__init__(x, fun, jac, hess, hessp)
   20501             :  *         self.tol_rel_i = tol_rel_i             # <<<<<<<<<<<<<<
   20502             :  *         self.tol_rel_b = tol_rel_b
   20503             :  *         self.disp = disp
   20504             :  */
   20505         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tol_rel_i, __pyx_v_tol_rel_i) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
   20506             : 
   20507             :   /* "scipy/optimize/_trlib/_trlib.pyx":16
   20508             :  *         super().__init__(x, fun, jac, hess, hessp)
   20509             :  *         self.tol_rel_i = tol_rel_i
   20510             :  *         self.tol_rel_b = tol_rel_b             # <<<<<<<<<<<<<<
   20511             :  *         self.disp = disp
   20512             :  *         self.itmax = int(min(1e9/self.jac.shape[0], 2*self.jac.shape[0]))
   20513             :  */
   20514         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tol_rel_b, __pyx_v_tol_rel_b) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
   20515             : 
   20516             :   /* "scipy/optimize/_trlib/_trlib.pyx":17
   20517             :  *         self.tol_rel_i = tol_rel_i
   20518             :  *         self.tol_rel_b = tol_rel_b
   20519             :  *         self.disp = disp             # <<<<<<<<<<<<<<
   20520             :  *         self.itmax = int(min(1e9/self.jac.shape[0], 2*self.jac.shape[0]))
   20521             :  *         cdef long itmax, iwork_size, fwork_size, h_pointer
   20522             :  */
   20523         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_disp, __pyx_v_disp) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
   20524             : 
   20525             :   /* "scipy/optimize/_trlib/_trlib.pyx":18
   20526             :  *         self.tol_rel_b = tol_rel_b
   20527             :  *         self.disp = disp
   20528             :  *         self.itmax = int(min(1e9/self.jac.shape[0], 2*self.jac.shape[0]))             # <<<<<<<<<<<<<<
   20529             :  *         cdef long itmax, iwork_size, fwork_size, h_pointer
   20530             :  *         itmax = self.itmax
   20531             :  */
   20532         208 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
   20533         208 :   __Pyx_GOTREF(__pyx_t_1);
   20534         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
   20535         208 :   __Pyx_GOTREF(__pyx_t_3);
   20536         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20537         208 :   __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
   20538         208 :   __Pyx_GOTREF(__pyx_t_1);
   20539         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20540         208 :   __pyx_t_3 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_t_1, 2, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
   20541         208 :   __Pyx_GOTREF(__pyx_t_3);
   20542         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20543         208 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
   20544         208 :   __Pyx_GOTREF(__pyx_t_1);
   20545         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
   20546         208 :   __Pyx_GOTREF(__pyx_t_2);
   20547         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20548         208 :   __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
   20549         208 :   __Pyx_GOTREF(__pyx_t_1);
   20550         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20551         208 :   __pyx_t_2 = __Pyx_PyFloat_TrueDivideCObj(__pyx_float_1e9, __pyx_t_1, 1e9, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
   20552         208 :   __Pyx_GOTREF(__pyx_t_2);
   20553         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20554         208 :   __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 18, __pyx_L1_error)
   20555         208 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 18, __pyx_L1_error)
   20556         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20557         208 :   if (__pyx_t_6) {
   20558         208 :     __Pyx_INCREF(__pyx_t_3);
   20559             :     __pyx_t_1 = __pyx_t_3;
   20560             :   } else {
   20561           0 :     __Pyx_INCREF(__pyx_t_2);
   20562             :     __pyx_t_1 = __pyx_t_2;
   20563             :   }
   20564         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20565         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20566         416 :   __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
   20567         208 :   __Pyx_GOTREF(__pyx_t_3);
   20568         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20569         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_itmax, __pyx_t_3) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
   20570         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20571             : 
   20572             :   /* "scipy/optimize/_trlib/_trlib.pyx":20
   20573             :  *         self.itmax = int(min(1e9/self.jac.shape[0], 2*self.jac.shape[0]))
   20574             :  *         cdef long itmax, iwork_size, fwork_size, h_pointer
   20575             :  *         itmax = self.itmax             # <<<<<<<<<<<<<<
   20576             :  *         ctrlib.trlib_krylov_memory_size(itmax, &iwork_size, &fwork_size,
   20577             :  *                                         &h_pointer)
   20578             :  */
   20579         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_itmax); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
   20580         208 :   __Pyx_GOTREF(__pyx_t_3);
   20581         208 :   __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error)
   20582         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20583         208 :   __pyx_v_itmax = __pyx_t_7;
   20584             : 
   20585             :   /* "scipy/optimize/_trlib/_trlib.pyx":21
   20586             :  *         cdef long itmax, iwork_size, fwork_size, h_pointer
   20587             :  *         itmax = self.itmax
   20588             :  *         ctrlib.trlib_krylov_memory_size(itmax, &iwork_size, &fwork_size,             # <<<<<<<<<<<<<<
   20589             :  *                                         &h_pointer)
   20590             :  *         self.h_pointer = h_pointer
   20591             :  */
   20592         208 :   (void)(trlib_krylov_memory_size(__pyx_v_itmax, (&__pyx_v_iwork_size), (&__pyx_v_fwork_size), (&__pyx_v_h_pointer)));
   20593             : 
   20594             :   /* "scipy/optimize/_trlib/_trlib.pyx":23
   20595             :  *         ctrlib.trlib_krylov_memory_size(itmax, &iwork_size, &fwork_size,
   20596             :  *                                         &h_pointer)
   20597             :  *         self.h_pointer = h_pointer             # <<<<<<<<<<<<<<
   20598             :  *         self.fwork = np.empty([fwork_size])
   20599             :  *         cdef double [:] fwork_view = self.fwork
   20600             :  */
   20601         208 :   __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_h_pointer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
   20602         208 :   __Pyx_GOTREF(__pyx_t_3);
   20603         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_h_pointer, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
   20604         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20605             : 
   20606             :   /* "scipy/optimize/_trlib/_trlib.pyx":24
   20607             :  *                                         &h_pointer)
   20608             :  *         self.h_pointer = h_pointer
   20609             :  *         self.fwork = np.empty([fwork_size])             # <<<<<<<<<<<<<<
   20610             :  *         cdef double [:] fwork_view = self.fwork
   20611             :  *         cdef double *fwork_ptr = NULL
   20612             :  */
   20613         208 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
   20614         208 :   __Pyx_GOTREF(__pyx_t_1);
   20615         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
   20616         208 :   __Pyx_GOTREF(__pyx_t_2);
   20617         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20618         208 :   __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_fwork_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
   20619         208 :   __Pyx_GOTREF(__pyx_t_1);
   20620         208 :   __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 24, __pyx_L1_error)
   20621         208 :   __Pyx_GOTREF(__pyx_t_5);
   20622         208 :   __Pyx_GIVEREF(__pyx_t_1);
   20623         208 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error);
   20624         208 :   __pyx_t_1 = 0;
   20625         208 :   __pyx_t_1 = NULL;
   20626         208 :   __pyx_t_4 = 0;
   20627             :   #if CYTHON_UNPACK_METHODS
   20628         208 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20629           0 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
   20630           0 :     if (likely(__pyx_t_1)) {
   20631           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20632           0 :       __Pyx_INCREF(__pyx_t_1);
   20633           0 :       __Pyx_INCREF(function);
   20634           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20635             :       __pyx_t_4 = 1;
   20636             :     }
   20637             :   }
   20638             :   #endif
   20639             :   {
   20640         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_5};
   20641         208 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20642         208 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   20643         208 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20644         208 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
   20645         208 :     __Pyx_GOTREF(__pyx_t_3);
   20646         208 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20647             :   }
   20648         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fwork, __pyx_t_3) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
   20649         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20650             : 
   20651             :   /* "scipy/optimize/_trlib/_trlib.pyx":25
   20652             :  *         self.h_pointer = h_pointer
   20653             :  *         self.fwork = np.empty([fwork_size])
   20654             :  *         cdef double [:] fwork_view = self.fwork             # <<<<<<<<<<<<<<
   20655             :  *         cdef double *fwork_ptr = NULL
   20656             :  *         if fwork_view.shape[0] > 0:
   20657             :  */
   20658         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fwork); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
   20659         208 :   __Pyx_GOTREF(__pyx_t_3);
   20660         208 :   __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 25, __pyx_L1_error)
   20661         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20662         208 :   __pyx_v_fwork_view = __pyx_t_8;
   20663         208 :   __pyx_t_8.memview = NULL;
   20664         208 :   __pyx_t_8.data = NULL;
   20665             : 
   20666             :   /* "scipy/optimize/_trlib/_trlib.pyx":26
   20667             :  *         self.fwork = np.empty([fwork_size])
   20668             :  *         cdef double [:] fwork_view = self.fwork
   20669             :  *         cdef double *fwork_ptr = NULL             # <<<<<<<<<<<<<<
   20670             :  *         if fwork_view.shape[0] > 0:
   20671             :  *             fwork_ptr = &fwork_view[0]
   20672             :  */
   20673         208 :   __pyx_v_fwork_ptr = NULL;
   20674             : 
   20675             :   /* "scipy/optimize/_trlib/_trlib.pyx":27
   20676             :  *         cdef double [:] fwork_view = self.fwork
   20677             :  *         cdef double *fwork_ptr = NULL
   20678             :  *         if fwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   20679             :  *             fwork_ptr = &fwork_view[0]
   20680             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   20681             :  */
   20682         208 :   __pyx_t_6 = ((__pyx_v_fwork_view.shape[0]) > 0);
   20683         208 :   if (__pyx_t_6) {
   20684             : 
   20685             :     /* "scipy/optimize/_trlib/_trlib.pyx":28
   20686             :  *         cdef double *fwork_ptr = NULL
   20687             :  *         if fwork_view.shape[0] > 0:
   20688             :  *             fwork_ptr = &fwork_view[0]             # <<<<<<<<<<<<<<
   20689             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   20690             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))
   20691             :  */
   20692         208 :     __pyx_t_9 = 0;
   20693         208 :     __pyx_t_10 = -1;
   20694         208 :     if (__pyx_t_9 < 0) {
   20695             :       __pyx_t_9 += __pyx_v_fwork_view.shape[0];
   20696             :       if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
   20697         208 :     } else if (unlikely(__pyx_t_9 >= __pyx_v_fwork_view.shape[0])) __pyx_t_10 = 0;
   20698         208 :     if (unlikely(__pyx_t_10 != -1)) {
   20699             :       __Pyx_RaiseBufferIndexError(__pyx_t_10);
   20700             :       __PYX_ERR(0, 28, __pyx_L1_error)
   20701             :     }
   20702         208 :     __pyx_v_fwork_ptr = (&(*((double *) ( /* dim=0 */ (__pyx_v_fwork_view.data + __pyx_t_9 * __pyx_v_fwork_view.strides[0]) ))));
   20703             : 
   20704             :     /* "scipy/optimize/_trlib/_trlib.pyx":27
   20705             :  *         cdef double [:] fwork_view = self.fwork
   20706             :  *         cdef double *fwork_ptr = NULL
   20707             :  *         if fwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   20708             :  *             fwork_ptr = &fwork_view[0]
   20709             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   20710             :  */
   20711             :   }
   20712             : 
   20713             :   /* "scipy/optimize/_trlib/_trlib.pyx":29
   20714             :  *         if fwork_view.shape[0] > 0:
   20715             :  *             fwork_ptr = &fwork_view[0]
   20716             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)             # <<<<<<<<<<<<<<
   20717             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))
   20718             :  *         self.s  = np.empty(self.jac.shape)
   20719             :  */
   20720         208 :   (void)(trlib_krylov_prepare_memory(__pyx_v_itmax, __pyx_v_fwork_ptr));
   20721             : 
   20722             :   /* "scipy/optimize/_trlib/_trlib.pyx":30
   20723             :  *             fwork_ptr = &fwork_view[0]
   20724             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   20725             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))             # <<<<<<<<<<<<<<
   20726             :  *         self.s  = np.empty(self.jac.shape)
   20727             :  *         self.g  = np.empty(self.jac.shape)
   20728             :  */
   20729         208 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
   20730         208 :   __Pyx_GOTREF(__pyx_t_3);
   20731         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
   20732         208 :   __Pyx_GOTREF(__pyx_t_2);
   20733         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20734         208 :   __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_iwork_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
   20735         208 :   __Pyx_GOTREF(__pyx_t_3);
   20736         208 :   __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error)
   20737         208 :   __Pyx_GOTREF(__pyx_t_5);
   20738         208 :   __Pyx_GIVEREF(__pyx_t_3);
   20739         208 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error);
   20740         208 :   __pyx_t_3 = 0;
   20741         208 :   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
   20742         208 :   __Pyx_GOTREF(__pyx_t_3);
   20743         208 :   __Pyx_GIVEREF(__pyx_t_5);
   20744         208 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error);
   20745         208 :   __pyx_t_5 = 0;
   20746         208 :   __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error)
   20747         208 :   __Pyx_GOTREF(__pyx_t_5);
   20748         208 :   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
   20749         208 :   __Pyx_GOTREF(__pyx_t_1);
   20750         208 :   if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
   20751         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20752         208 :   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
   20753         208 :   __Pyx_GOTREF(__pyx_t_1);
   20754         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20755         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20756         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20757         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_iwork, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
   20758         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20759             : 
   20760             :   /* "scipy/optimize/_trlib/_trlib.pyx":31
   20761             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   20762             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))
   20763             :  *         self.s  = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20764             :  *         self.g  = np.empty(self.jac.shape)
   20765             :  *         self.v  = np.empty(self.jac.shape)
   20766             :  */
   20767         208 :   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error)
   20768         208 :   __Pyx_GOTREF(__pyx_t_5);
   20769         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L1_error)
   20770         208 :   __Pyx_GOTREF(__pyx_t_3);
   20771         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20772         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error)
   20773         208 :   __Pyx_GOTREF(__pyx_t_5);
   20774         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
   20775         208 :   __Pyx_GOTREF(__pyx_t_2);
   20776         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20777         208 :   __pyx_t_5 = NULL;
   20778         208 :   __pyx_t_4 = 0;
   20779             :   #if CYTHON_UNPACK_METHODS
   20780         208 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20781           0 :     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
   20782           0 :     if (likely(__pyx_t_5)) {
   20783           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20784           0 :       __Pyx_INCREF(__pyx_t_5);
   20785           0 :       __Pyx_INCREF(function);
   20786           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20787             :       __pyx_t_4 = 1;
   20788             :     }
   20789             :   }
   20790             :   #endif
   20791             :   {
   20792         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
   20793         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20794         208 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   20795         208 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20796         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
   20797         208 :     __Pyx_GOTREF(__pyx_t_1);
   20798         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20799             :   }
   20800         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_s, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
   20801         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20802             : 
   20803             :   /* "scipy/optimize/_trlib/_trlib.pyx":32
   20804             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))
   20805             :  *         self.s  = np.empty(self.jac.shape)
   20806             :  *         self.g  = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20807             :  *         self.v  = np.empty(self.jac.shape)
   20808             :  *         self.gm = np.empty(self.jac.shape)
   20809             :  */
   20810         208 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error)
   20811         208 :   __Pyx_GOTREF(__pyx_t_3);
   20812         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
   20813         208 :   __Pyx_GOTREF(__pyx_t_2);
   20814         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20815         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 32, __pyx_L1_error)
   20816         208 :   __Pyx_GOTREF(__pyx_t_3);
   20817         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 32, __pyx_L1_error)
   20818         208 :   __Pyx_GOTREF(__pyx_t_5);
   20819         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20820         208 :   __pyx_t_3 = NULL;
   20821         208 :   __pyx_t_4 = 0;
   20822             :   #if CYTHON_UNPACK_METHODS
   20823         208 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20824           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20825           0 :     if (likely(__pyx_t_3)) {
   20826           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20827           0 :       __Pyx_INCREF(__pyx_t_3);
   20828           0 :       __Pyx_INCREF(function);
   20829           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20830             :       __pyx_t_4 = 1;
   20831             :     }
   20832             :   }
   20833             :   #endif
   20834             :   {
   20835         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
   20836         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20837         208 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20838         208 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20839         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
   20840         208 :     __Pyx_GOTREF(__pyx_t_1);
   20841         208 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20842             :   }
   20843         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_g, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
   20844         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20845             : 
   20846             :   /* "scipy/optimize/_trlib/_trlib.pyx":33
   20847             :  *         self.s  = np.empty(self.jac.shape)
   20848             :  *         self.g  = np.empty(self.jac.shape)
   20849             :  *         self.v  = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20850             :  *         self.gm = np.empty(self.jac.shape)
   20851             :  *         self.p  = np.empty(self.jac.shape)
   20852             :  */
   20853         208 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
   20854         208 :   __Pyx_GOTREF(__pyx_t_2);
   20855         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error)
   20856         208 :   __Pyx_GOTREF(__pyx_t_5);
   20857         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20858         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
   20859         208 :   __Pyx_GOTREF(__pyx_t_2);
   20860         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
   20861         208 :   __Pyx_GOTREF(__pyx_t_3);
   20862         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20863         208 :   __pyx_t_2 = NULL;
   20864         208 :   __pyx_t_4 = 0;
   20865             :   #if CYTHON_UNPACK_METHODS
   20866         208 :   if (unlikely(PyMethod_Check(__pyx_t_5))) {
   20867           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
   20868           0 :     if (likely(__pyx_t_2)) {
   20869           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
   20870           0 :       __Pyx_INCREF(__pyx_t_2);
   20871           0 :       __Pyx_INCREF(function);
   20872           0 :       __Pyx_DECREF_SET(__pyx_t_5, function);
   20873             :       __pyx_t_4 = 1;
   20874             :     }
   20875             :   }
   20876             :   #endif
   20877             :   {
   20878         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
   20879         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20880         208 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   20881         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20882         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
   20883         208 :     __Pyx_GOTREF(__pyx_t_1);
   20884         208 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20885             :   }
   20886         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_v, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
   20887         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20888             : 
   20889             :   /* "scipy/optimize/_trlib/_trlib.pyx":34
   20890             :  *         self.g  = np.empty(self.jac.shape)
   20891             :  *         self.v  = np.empty(self.jac.shape)
   20892             :  *         self.gm = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20893             :  *         self.p  = np.empty(self.jac.shape)
   20894             :  *         self.Hp = np.empty(self.jac.shape)
   20895             :  */
   20896         208 :   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error)
   20897         208 :   __Pyx_GOTREF(__pyx_t_5);
   20898         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
   20899         208 :   __Pyx_GOTREF(__pyx_t_3);
   20900         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20901         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error)
   20902         208 :   __Pyx_GOTREF(__pyx_t_5);
   20903         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
   20904         208 :   __Pyx_GOTREF(__pyx_t_2);
   20905         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20906         208 :   __pyx_t_5 = NULL;
   20907         208 :   __pyx_t_4 = 0;
   20908             :   #if CYTHON_UNPACK_METHODS
   20909         208 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20910           0 :     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
   20911           0 :     if (likely(__pyx_t_5)) {
   20912           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20913           0 :       __Pyx_INCREF(__pyx_t_5);
   20914           0 :       __Pyx_INCREF(function);
   20915           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20916             :       __pyx_t_4 = 1;
   20917             :     }
   20918             :   }
   20919             :   #endif
   20920             :   {
   20921         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2};
   20922         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20923         208 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   20924         208 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20925         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
   20926         208 :     __Pyx_GOTREF(__pyx_t_1);
   20927         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20928             :   }
   20929         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_gm, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
   20930         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20931             : 
   20932             :   /* "scipy/optimize/_trlib/_trlib.pyx":35
   20933             :  *         self.v  = np.empty(self.jac.shape)
   20934             :  *         self.gm = np.empty(self.jac.shape)
   20935             :  *         self.p  = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20936             :  *         self.Hp = np.empty(self.jac.shape)
   20937             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])
   20938             :  */
   20939         208 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
   20940         208 :   __Pyx_GOTREF(__pyx_t_3);
   20941         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
   20942         208 :   __Pyx_GOTREF(__pyx_t_2);
   20943         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20944         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error)
   20945         208 :   __Pyx_GOTREF(__pyx_t_3);
   20946         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 35, __pyx_L1_error)
   20947         208 :   __Pyx_GOTREF(__pyx_t_5);
   20948         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20949         208 :   __pyx_t_3 = NULL;
   20950         208 :   __pyx_t_4 = 0;
   20951             :   #if CYTHON_UNPACK_METHODS
   20952         208 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20953           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20954           0 :     if (likely(__pyx_t_3)) {
   20955           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20956           0 :       __Pyx_INCREF(__pyx_t_3);
   20957           0 :       __Pyx_INCREF(function);
   20958           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20959             :       __pyx_t_4 = 1;
   20960             :     }
   20961             :   }
   20962             :   #endif
   20963             :   {
   20964         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
   20965         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20966         208 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20967         208 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20968         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
   20969         208 :     __Pyx_GOTREF(__pyx_t_1);
   20970         208 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20971             :   }
   20972         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_p, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
   20973         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20974             : 
   20975             :   /* "scipy/optimize/_trlib/_trlib.pyx":36
   20976             :  *         self.gm = np.empty(self.jac.shape)
   20977             :  *         self.p  = np.empty(self.jac.shape)
   20978             :  *         self.Hp = np.empty(self.jac.shape)             # <<<<<<<<<<<<<<
   20979             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])
   20980             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],
   20981             :  */
   20982         208 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
   20983         208 :   __Pyx_GOTREF(__pyx_t_2);
   20984         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 36, __pyx_L1_error)
   20985         208 :   __Pyx_GOTREF(__pyx_t_5);
   20986         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20987         208 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
   20988         208 :   __Pyx_GOTREF(__pyx_t_2);
   20989         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
   20990         208 :   __Pyx_GOTREF(__pyx_t_3);
   20991         208 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20992         208 :   __pyx_t_2 = NULL;
   20993         208 :   __pyx_t_4 = 0;
   20994             :   #if CYTHON_UNPACK_METHODS
   20995         208 :   if (unlikely(PyMethod_Check(__pyx_t_5))) {
   20996           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
   20997           0 :     if (likely(__pyx_t_2)) {
   20998           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
   20999           0 :       __Pyx_INCREF(__pyx_t_2);
   21000           0 :       __Pyx_INCREF(function);
   21001           0 :       __Pyx_DECREF_SET(__pyx_t_5, function);
   21002             :       __pyx_t_4 = 1;
   21003             :     }
   21004             :   }
   21005             :   #endif
   21006             :   {
   21007         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
   21008         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   21009         208 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   21010         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21011         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
   21012         208 :     __Pyx_GOTREF(__pyx_t_1);
   21013         208 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21014             :   }
   21015         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Hp, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
   21016         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21017             : 
   21018             :   /* "scipy/optimize/_trlib/_trlib.pyx":37
   21019             :  *         self.p  = np.empty(self.jac.shape)
   21020             :  *         self.Hp = np.empty(self.jac.shape)
   21021             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])             # <<<<<<<<<<<<<<
   21022             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],
   21023             :  *                                dtype=np.dtype("long"))
   21024             :  */
   21025         208 :   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
   21026         208 :   __Pyx_GOTREF(__pyx_t_5);
   21027         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
   21028         208 :   __Pyx_GOTREF(__pyx_t_3);
   21029         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21030         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_itmax); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
   21031         208 :   __Pyx_GOTREF(__pyx_t_5);
   21032         208 :   __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
   21033         208 :   __Pyx_GOTREF(__pyx_t_2);
   21034         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21035         208 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
   21036         208 :   __Pyx_GOTREF(__pyx_t_5);
   21037         208 :   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 37, __pyx_L1_error)
   21038         208 :   __Pyx_GOTREF(__pyx_t_11);
   21039         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21040         208 :   __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error)
   21041         208 :   __Pyx_GOTREF(__pyx_t_5);
   21042         208 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21043         208 :   __pyx_t_11 = PyList_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 37, __pyx_L1_error)
   21044         208 :   __Pyx_GOTREF(__pyx_t_11);
   21045         208 :   __Pyx_GIVEREF(__pyx_t_2);
   21046         208 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error);
   21047         208 :   __Pyx_GIVEREF(__pyx_t_5);
   21048         208 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_t_5)) __PYX_ERR(0, 37, __pyx_L1_error);
   21049         208 :   __pyx_t_2 = 0;
   21050         208 :   __pyx_t_5 = 0;
   21051         208 :   __pyx_t_5 = NULL;
   21052         208 :   __pyx_t_4 = 0;
   21053             :   #if CYTHON_UNPACK_METHODS
   21054         208 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   21055           0 :     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
   21056           0 :     if (likely(__pyx_t_5)) {
   21057           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   21058           0 :       __Pyx_INCREF(__pyx_t_5);
   21059           0 :       __Pyx_INCREF(function);
   21060           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   21061             :       __pyx_t_4 = 1;
   21062             :     }
   21063             :   }
   21064             :   #endif
   21065             :   {
   21066         208 :     PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_11};
   21067         208 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   21068         208 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   21069         208 :     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21070         208 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
   21071         208 :     __Pyx_GOTREF(__pyx_t_1);
   21072         208 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21073             :   }
   21074         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Q, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
   21075         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21076             : 
   21077             :   /* "scipy/optimize/_trlib/_trlib.pyx":38
   21078             :  *         self.Hp = np.empty(self.jac.shape)
   21079             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])
   21080             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],             # <<<<<<<<<<<<<<
   21081             :  *                                dtype=np.dtype("long"))
   21082             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   21083             :  */
   21084         208 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
   21085         208 :   __Pyx_GOTREF(__pyx_t_1);
   21086         208 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
   21087         208 :   __Pyx_GOTREF(__pyx_t_3);
   21088         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21089         416 :   __pyx_t_1 = __Pyx_PyInt_From_long(trlib_krylov_timing_size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
   21090         208 :   __Pyx_GOTREF(__pyx_t_1);
   21091         208 :   __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error)
   21092         208 :   __Pyx_GOTREF(__pyx_t_11);
   21093         208 :   __Pyx_GIVEREF(__pyx_t_1);
   21094         208 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error);
   21095         208 :   __pyx_t_1 = 0;
   21096         208 :   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
   21097         208 :   __Pyx_GOTREF(__pyx_t_1);
   21098         208 :   __Pyx_GIVEREF(__pyx_t_11);
   21099         208 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error);
   21100         208 :   __pyx_t_11 = 0;
   21101             : 
   21102             :   /* "scipy/optimize/_trlib/_trlib.pyx":39
   21103             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])
   21104             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],
   21105             :  *                                dtype=np.dtype("long"))             # <<<<<<<<<<<<<<
   21106             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   21107             :  * 
   21108             :  */
   21109         208 :   __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 39, __pyx_L1_error)
   21110         208 :   __Pyx_GOTREF(__pyx_t_11);
   21111         208 :   __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5numpy_dtype), __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error)
   21112         208 :   __Pyx_GOTREF(__pyx_t_5);
   21113         208 :   if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
   21114         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21115             : 
   21116             :   /* "scipy/optimize/_trlib/_trlib.pyx":38
   21117             :  *         self.Hp = np.empty(self.jac.shape)
   21118             :  *         self.Q  = np.empty([self.itmax+1, self.jac.shape[0]])
   21119             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],             # <<<<<<<<<<<<<<
   21120             :  *                                dtype=np.dtype("long"))
   21121             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   21122             :  */
   21123         208 :   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error)
   21124         208 :   __Pyx_GOTREF(__pyx_t_5);
   21125         208 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21126         208 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21127         208 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21128         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_timing, __pyx_t_5) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
   21129         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21130             : 
   21131             :   /* "scipy/optimize/_trlib/_trlib.pyx":40
   21132             :  *         self.timing = np.zeros([ctrlib.trlib_krylov_timing_size()],
   21133             :  *                                dtype=np.dtype("long"))
   21134             :  *         self.init = ctrlib._TRLIB_CLS_INIT             # <<<<<<<<<<<<<<
   21135             :  * 
   21136             :  *     def solve(self, double trust_radius):
   21137             :  */
   21138         208 :   __pyx_t_5 = __Pyx_PyInt_From_long(TRLIB_CLS_INIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error)
   21139         208 :   __Pyx_GOTREF(__pyx_t_5);
   21140         208 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_init_2, __pyx_t_5) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
   21141         208 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21142             : 
   21143             :   /* "scipy/optimize/_trlib/_trlib.pyx":12
   21144             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   21145             :  * 
   21146             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,             # <<<<<<<<<<<<<<
   21147             :  *                  disp=False):
   21148             :  *         super().__init__(x, fun, jac, hess, hessp)
   21149             :  */
   21150             : 
   21151             :   /* function exit code */
   21152         208 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   21153         208 :   goto __pyx_L0;
   21154           0 :   __pyx_L1_error:;
   21155           0 :   __Pyx_XDECREF(__pyx_t_1);
   21156           0 :   __Pyx_XDECREF(__pyx_t_2);
   21157           0 :   __Pyx_XDECREF(__pyx_t_3);
   21158           0 :   __Pyx_XDECREF(__pyx_t_5);
   21159           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1);
   21160           0 :   __Pyx_XDECREF(__pyx_t_11);
   21161           0 :   __Pyx_AddTraceback("scipy.optimize._trlib._trlib.TRLIBQuadraticSubproblem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21162           0 :   __pyx_r = NULL;
   21163         208 :   __pyx_L0:;
   21164         208 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_fwork_view, 1);
   21165         208 :   __Pyx_XGIVEREF(__pyx_r);
   21166         208 :   __Pyx_RefNannyFinishContext();
   21167         208 :   return __pyx_r;
   21168             : }
   21169             : 
   21170             : /* "scipy/optimize/_trlib/_trlib.pyx":42
   21171             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   21172             :  * 
   21173             :  *     def solve(self, double trust_radius):             # <<<<<<<<<<<<<<
   21174             :  * 
   21175             :  *         cdef long equality = 0
   21176             :  */
   21177             : 
   21178             : /* Python wrapper */
   21179             : static PyObject *__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_3solve(PyObject *__pyx_self, 
   21180             : #if CYTHON_METH_FASTCALL
   21181             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21182             : #else
   21183             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21184             : #endif
   21185             : ); /*proto*/
   21186             : static PyMethodDef __pyx_mdef_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_3solve = {"solve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_3solve, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   21187         188 : static PyObject *__pyx_pw_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_3solve(PyObject *__pyx_self, 
   21188             : #if CYTHON_METH_FASTCALL
   21189             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21190             : #else
   21191             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21192             : #endif
   21193             : ) {
   21194         188 :   PyObject *__pyx_v_self = 0;
   21195         188 :   double __pyx_v_trust_radius;
   21196             :   #if !CYTHON_METH_FASTCALL
   21197             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   21198             :   #endif
   21199         188 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   21200         188 :   PyObject* values[2] = {0,0};
   21201         188 :   int __pyx_lineno = 0;
   21202         188 :   const char *__pyx_filename = NULL;
   21203         188 :   int __pyx_clineno = 0;
   21204         188 :   PyObject *__pyx_r = 0;
   21205             :   __Pyx_RefNannyDeclarations
   21206         188 :   __Pyx_RefNannySetupContext("solve (wrapper)", 0);
   21207             :   #if !CYTHON_METH_FASTCALL
   21208             :   #if CYTHON_ASSUME_SAFE_MACROS
   21209             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   21210             :   #else
   21211             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   21212             :   #endif
   21213             :   #endif
   21214         188 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   21215             :   {
   21216         188 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_trust_radius,0};
   21217         188 :     if (__pyx_kwds) {
   21218           0 :       Py_ssize_t kw_args;
   21219           0 :       switch (__pyx_nargs) {
   21220           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   21221           0 :         CYTHON_FALLTHROUGH;
   21222           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21223           0 :         CYTHON_FALLTHROUGH;
   21224           0 :         case  0: break;
   21225           0 :         default: goto __pyx_L5_argtuple_error;
   21226             :       }
   21227           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   21228           0 :       switch (__pyx_nargs) {
   21229             :         case  0:
   21230           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   21231           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   21232           0 :           kw_args--;
   21233             :         }
   21234           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error)
   21235           0 :         else goto __pyx_L5_argtuple_error;
   21236           0 :         CYTHON_FALLTHROUGH;
   21237             :         case  1:
   21238           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_trust_radius)) != 0)) {
   21239           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   21240           0 :           kw_args--;
   21241             :         }
   21242           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error)
   21243             :         else {
   21244           0 :           __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, 1); __PYX_ERR(0, 42, __pyx_L3_error)
   21245             :         }
   21246             :       }
   21247           0 :       if (unlikely(kw_args > 0)) {
   21248           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   21249           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "solve") < 0)) __PYX_ERR(0, 42, __pyx_L3_error)
   21250             :       }
   21251         188 :     } else if (unlikely(__pyx_nargs != 2)) {
   21252           0 :       goto __pyx_L5_argtuple_error;
   21253             :     } else {
   21254         188 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21255         188 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   21256             :     }
   21257         188 :     __pyx_v_self = values[0];
   21258         188 :     __pyx_v_trust_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_trust_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 42, __pyx_L3_error)
   21259             :   }
   21260         188 :   goto __pyx_L6_skip;
   21261           0 :   __pyx_L5_argtuple_error:;
   21262           0 :   __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 42, __pyx_L3_error)
   21263         188 :   __pyx_L6_skip:;
   21264         188 :   goto __pyx_L4_argument_unpacking_done;
   21265           0 :   __pyx_L3_error:;
   21266             :   {
   21267           0 :     Py_ssize_t __pyx_temp;
   21268           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21269             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21270             :     }
   21271             :   }
   21272           0 :   __Pyx_AddTraceback("scipy.optimize._trlib._trlib.TRLIBQuadraticSubproblem.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21273           0 :   __Pyx_RefNannyFinishContext();
   21274           0 :   return NULL;
   21275         188 :   __pyx_L4_argument_unpacking_done:;
   21276         188 :   __pyx_r = __pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_2solve(__pyx_self, __pyx_v_self, __pyx_v_trust_radius);
   21277             : 
   21278             :   /* function exit code */
   21279             :   {
   21280         188 :     Py_ssize_t __pyx_temp;
   21281         188 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21282             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21283             :     }
   21284             :   }
   21285             :   __Pyx_RefNannyFinishContext();
   21286             :   return __pyx_r;
   21287             : }
   21288             : 
   21289         188 : static PyObject *__pyx_pf_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_2solve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, double __pyx_v_trust_radius) {
   21290         188 :   long __pyx_v_equality;
   21291         188 :   long __pyx_v_itmax_lanczos;
   21292         188 :   double __pyx_v_tol_r_i;
   21293         188 :   double __pyx_v_tol_a_i;
   21294         188 :   double __pyx_v_tol_r_b;
   21295         188 :   double __pyx_v_tol_a_b;
   21296         188 :   double __pyx_v_zero;
   21297         188 :   double __pyx_v_obj_lb;
   21298         188 :   long __pyx_v_ctl_invariant;
   21299         188 :   long __pyx_v_convexify;
   21300         188 :   long __pyx_v_earlyterm;
   21301         188 :   double __pyx_v_g_dot_g;
   21302         188 :   double __pyx_v_v_dot_g;
   21303         188 :   double __pyx_v_p_dot_Hp;
   21304         188 :   long __pyx_v_refine;
   21305         188 :   long __pyx_v_verbose;
   21306         188 :   long __pyx_v_unicode;
   21307         188 :   long __pyx_v_ret;
   21308         188 :   long __pyx_v_action;
   21309         188 :   long __pyx_v_it;
   21310         188 :   long __pyx_v_ityp;
   21311         188 :   long __pyx_v_itmax;
   21312         188 :   long __pyx_v_init;
   21313         188 :   double __pyx_v_flt1;
   21314         188 :   double __pyx_v_flt2;
   21315         188 :   double __pyx_v_flt3;
   21316         188 :   PyObject *__pyx_v_prefix = NULL;
   21317         188 :   __Pyx_memviewslice __pyx_v_iwork_view = { 0, 0, { 0 }, { 0 }, { 0 } };
   21318         188 :   __Pyx_memviewslice __pyx_v_fwork_view = { 0, 0, { 0 }, { 0 }, { 0 } };
   21319         188 :   __Pyx_memviewslice __pyx_v_timing_view = { 0, 0, { 0 }, { 0 }, { 0 } };
   21320         188 :   long *__pyx_v_iwork_ptr;
   21321         188 :   double *__pyx_v_fwork_ptr;
   21322         188 :   long *__pyx_v_timing_ptr;
   21323         188 :   struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream *__pyx_v_messages = 0;
   21324         188 :   PyObject *__pyx_v_msg = NULL;
   21325         188 :   PyObject *__pyx_r = NULL;
   21326             :   __Pyx_RefNannyDeclarations
   21327         188 :   PyObject *__pyx_t_1 = NULL;
   21328         188 :   double __pyx_t_2;
   21329         188 :   long __pyx_t_3;
   21330         188 :   __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21331         188 :   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
   21332         188 :   int __pyx_t_6;
   21333         188 :   Py_ssize_t __pyx_t_7;
   21334         188 :   int __pyx_t_8;
   21335         188 :   PyObject *__pyx_t_9 = NULL;
   21336         188 :   PyObject *__pyx_t_10 = NULL;
   21337         188 :   unsigned int __pyx_t_11;
   21338         188 :   char *__pyx_t_12;
   21339         188 :   PyObject *__pyx_t_13 = NULL;
   21340         188 :   PyObject *__pyx_t_14 = NULL;
   21341         188 :   PyObject *__pyx_t_15 = NULL;
   21342         188 :   PyObject *__pyx_t_16 = NULL;
   21343         188 :   int __pyx_t_17;
   21344         188 :   char const *__pyx_t_18;
   21345         188 :   PyObject *__pyx_t_19 = NULL;
   21346         188 :   PyObject *__pyx_t_20 = NULL;
   21347         188 :   PyObject *__pyx_t_21 = NULL;
   21348         188 :   PyObject *__pyx_t_22 = NULL;
   21349         188 :   PyObject *__pyx_t_23 = NULL;
   21350         188 :   PyObject *__pyx_t_24 = NULL;
   21351         188 :   int __pyx_lineno = 0;
   21352         188 :   const char *__pyx_filename = NULL;
   21353         188 :   int __pyx_clineno = 0;
   21354         188 :   __Pyx_RefNannySetupContext("solve", 1);
   21355             : 
   21356             :   /* "scipy/optimize/_trlib/_trlib.pyx":44
   21357             :  *     def solve(self, double trust_radius):
   21358             :  * 
   21359             :  *         cdef long equality = 0             # <<<<<<<<<<<<<<
   21360             :  *         cdef long itmax_lanczos = 100
   21361             :  *         cdef double tol_r_i = self.tol_rel_i
   21362             :  */
   21363         188 :   __pyx_v_equality = 0;
   21364             : 
   21365             :   /* "scipy/optimize/_trlib/_trlib.pyx":45
   21366             :  * 
   21367             :  *         cdef long equality = 0
   21368             :  *         cdef long itmax_lanczos = 100             # <<<<<<<<<<<<<<
   21369             :  *         cdef double tol_r_i = self.tol_rel_i
   21370             :  *         cdef double tol_a_i =  0.0
   21371             :  */
   21372         188 :   __pyx_v_itmax_lanczos = 0x64;
   21373             : 
   21374             :   /* "scipy/optimize/_trlib/_trlib.pyx":46
   21375             :  *         cdef long equality = 0
   21376             :  *         cdef long itmax_lanczos = 100
   21377             :  *         cdef double tol_r_i = self.tol_rel_i             # <<<<<<<<<<<<<<
   21378             :  *         cdef double tol_a_i =  0.0
   21379             :  *         cdef double tol_r_b = self.tol_rel_b
   21380             :  */
   21381         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tol_rel_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
   21382         188 :   __Pyx_GOTREF(__pyx_t_1);
   21383         188 :   __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L1_error)
   21384         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21385         188 :   __pyx_v_tol_r_i = __pyx_t_2;
   21386             : 
   21387             :   /* "scipy/optimize/_trlib/_trlib.pyx":47
   21388             :  *         cdef long itmax_lanczos = 100
   21389             :  *         cdef double tol_r_i = self.tol_rel_i
   21390             :  *         cdef double tol_a_i =  0.0             # <<<<<<<<<<<<<<
   21391             :  *         cdef double tol_r_b = self.tol_rel_b
   21392             :  *         cdef double tol_a_b =  0.0
   21393             :  */
   21394         188 :   __pyx_v_tol_a_i = 0.0;
   21395             : 
   21396             :   /* "scipy/optimize/_trlib/_trlib.pyx":48
   21397             :  *         cdef double tol_r_i = self.tol_rel_i
   21398             :  *         cdef double tol_a_i =  0.0
   21399             :  *         cdef double tol_r_b = self.tol_rel_b             # <<<<<<<<<<<<<<
   21400             :  *         cdef double tol_a_b =  0.0
   21401             :  *         cdef double zero = 2e-16
   21402             :  */
   21403         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tol_rel_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
   21404         188 :   __Pyx_GOTREF(__pyx_t_1);
   21405         188 :   __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 48, __pyx_L1_error)
   21406         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21407         188 :   __pyx_v_tol_r_b = __pyx_t_2;
   21408             : 
   21409             :   /* "scipy/optimize/_trlib/_trlib.pyx":49
   21410             :  *         cdef double tol_a_i =  0.0
   21411             :  *         cdef double tol_r_b = self.tol_rel_b
   21412             :  *         cdef double tol_a_b =  0.0             # <<<<<<<<<<<<<<
   21413             :  *         cdef double zero = 2e-16
   21414             :  *         cdef double obj_lb = -1e20
   21415             :  */
   21416         188 :   __pyx_v_tol_a_b = 0.0;
   21417             : 
   21418             :   /* "scipy/optimize/_trlib/_trlib.pyx":50
   21419             :  *         cdef double tol_r_b = self.tol_rel_b
   21420             :  *         cdef double tol_a_b =  0.0
   21421             :  *         cdef double zero = 2e-16             # <<<<<<<<<<<<<<
   21422             :  *         cdef double obj_lb = -1e20
   21423             :  *         cdef long ctl_invariant = 0
   21424             :  */
   21425         188 :   __pyx_v_zero = 2e-16;
   21426             : 
   21427             :   /* "scipy/optimize/_trlib/_trlib.pyx":51
   21428             :  *         cdef double tol_a_b =  0.0
   21429             :  *         cdef double zero = 2e-16
   21430             :  *         cdef double obj_lb = -1e20             # <<<<<<<<<<<<<<
   21431             :  *         cdef long ctl_invariant = 0
   21432             :  *         cdef long convexify = 1
   21433             :  */
   21434         188 :   __pyx_v_obj_lb = -1e20;
   21435             : 
   21436             :   /* "scipy/optimize/_trlib/_trlib.pyx":52
   21437             :  *         cdef double zero = 2e-16
   21438             :  *         cdef double obj_lb = -1e20
   21439             :  *         cdef long ctl_invariant = 0             # <<<<<<<<<<<<<<
   21440             :  *         cdef long convexify = 1
   21441             :  *         cdef long earlyterm = 1
   21442             :  */
   21443         188 :   __pyx_v_ctl_invariant = 0;
   21444             : 
   21445             :   /* "scipy/optimize/_trlib/_trlib.pyx":53
   21446             :  *         cdef double obj_lb = -1e20
   21447             :  *         cdef long ctl_invariant = 0
   21448             :  *         cdef long convexify = 1             # <<<<<<<<<<<<<<
   21449             :  *         cdef long earlyterm = 1
   21450             :  *         cdef double g_dot_g = 0.0
   21451             :  */
   21452         188 :   __pyx_v_convexify = 1;
   21453             : 
   21454             :   /* "scipy/optimize/_trlib/_trlib.pyx":54
   21455             :  *         cdef long ctl_invariant = 0
   21456             :  *         cdef long convexify = 1
   21457             :  *         cdef long earlyterm = 1             # <<<<<<<<<<<<<<
   21458             :  *         cdef double g_dot_g = 0.0
   21459             :  *         cdef double v_dot_g = 0.0
   21460             :  */
   21461         188 :   __pyx_v_earlyterm = 1;
   21462             : 
   21463             :   /* "scipy/optimize/_trlib/_trlib.pyx":55
   21464             :  *         cdef long convexify = 1
   21465             :  *         cdef long earlyterm = 1
   21466             :  *         cdef double g_dot_g = 0.0             # <<<<<<<<<<<<<<
   21467             :  *         cdef double v_dot_g = 0.0
   21468             :  *         cdef double p_dot_Hp = 0.0
   21469             :  */
   21470         188 :   __pyx_v_g_dot_g = 0.0;
   21471             : 
   21472             :   /* "scipy/optimize/_trlib/_trlib.pyx":56
   21473             :  *         cdef long earlyterm = 1
   21474             :  *         cdef double g_dot_g = 0.0
   21475             :  *         cdef double v_dot_g = 0.0             # <<<<<<<<<<<<<<
   21476             :  *         cdef double p_dot_Hp = 0.0
   21477             :  *         cdef long refine = 1
   21478             :  */
   21479         188 :   __pyx_v_v_dot_g = 0.0;
   21480             : 
   21481             :   /* "scipy/optimize/_trlib/_trlib.pyx":57
   21482             :  *         cdef double g_dot_g = 0.0
   21483             :  *         cdef double v_dot_g = 0.0
   21484             :  *         cdef double p_dot_Hp = 0.0             # <<<<<<<<<<<<<<
   21485             :  *         cdef long refine = 1
   21486             :  *         cdef long verbose = 0
   21487             :  */
   21488         188 :   __pyx_v_p_dot_Hp = 0.0;
   21489             : 
   21490             :   /* "scipy/optimize/_trlib/_trlib.pyx":58
   21491             :  *         cdef double v_dot_g = 0.0
   21492             :  *         cdef double p_dot_Hp = 0.0
   21493             :  *         cdef long refine = 1             # <<<<<<<<<<<<<<
   21494             :  *         cdef long verbose = 0
   21495             :  *         cdef long unicode = 1
   21496             :  */
   21497         188 :   __pyx_v_refine = 1;
   21498             : 
   21499             :   /* "scipy/optimize/_trlib/_trlib.pyx":59
   21500             :  *         cdef double p_dot_Hp = 0.0
   21501             :  *         cdef long refine = 1
   21502             :  *         cdef long verbose = 0             # <<<<<<<<<<<<<<
   21503             :  *         cdef long unicode = 1
   21504             :  *         cdef long ret = 0
   21505             :  */
   21506         188 :   __pyx_v_verbose = 0;
   21507             : 
   21508             :   /* "scipy/optimize/_trlib/_trlib.pyx":60
   21509             :  *         cdef long refine = 1
   21510             :  *         cdef long verbose = 0
   21511             :  *         cdef long unicode = 1             # <<<<<<<<<<<<<<
   21512             :  *         cdef long ret = 0
   21513             :  *         cdef long action = 0
   21514             :  */
   21515         188 :   __pyx_v_unicode = 1;
   21516             : 
   21517             :   /* "scipy/optimize/_trlib/_trlib.pyx":61
   21518             :  *         cdef long verbose = 0
   21519             :  *         cdef long unicode = 1
   21520             :  *         cdef long ret = 0             # <<<<<<<<<<<<<<
   21521             :  *         cdef long action = 0
   21522             :  *         cdef long it = 0
   21523             :  */
   21524         188 :   __pyx_v_ret = 0;
   21525             : 
   21526             :   /* "scipy/optimize/_trlib/_trlib.pyx":62
   21527             :  *         cdef long unicode = 1
   21528             :  *         cdef long ret = 0
   21529             :  *         cdef long action = 0             # <<<<<<<<<<<<<<
   21530             :  *         cdef long it = 0
   21531             :  *         cdef long ityp = 0
   21532             :  */
   21533         188 :   __pyx_v_action = 0;
   21534             : 
   21535             :   /* "scipy/optimize/_trlib/_trlib.pyx":63
   21536             :  *         cdef long ret = 0
   21537             :  *         cdef long action = 0
   21538             :  *         cdef long it = 0             # <<<<<<<<<<<<<<
   21539             :  *         cdef long ityp = 0
   21540             :  *         cdef long itmax = self.itmax
   21541             :  */
   21542         188 :   __pyx_v_it = 0;
   21543             : 
   21544             :   /* "scipy/optimize/_trlib/_trlib.pyx":64
   21545             :  *         cdef long action = 0
   21546             :  *         cdef long it = 0
   21547             :  *         cdef long ityp = 0             # <<<<<<<<<<<<<<
   21548             :  *         cdef long itmax = self.itmax
   21549             :  *         cdef long init  = self.init
   21550             :  */
   21551         188 :   __pyx_v_ityp = 0;
   21552             : 
   21553             :   /* "scipy/optimize/_trlib/_trlib.pyx":65
   21554             :  *         cdef long it = 0
   21555             :  *         cdef long ityp = 0
   21556             :  *         cdef long itmax = self.itmax             # <<<<<<<<<<<<<<
   21557             :  *         cdef long init  = self.init
   21558             :  *         cdef double flt1 = 0.0
   21559             :  */
   21560         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_itmax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
   21561         188 :   __Pyx_GOTREF(__pyx_t_1);
   21562         188 :   __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 65, __pyx_L1_error)
   21563         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21564         188 :   __pyx_v_itmax = __pyx_t_3;
   21565             : 
   21566             :   /* "scipy/optimize/_trlib/_trlib.pyx":66
   21567             :  *         cdef long ityp = 0
   21568             :  *         cdef long itmax = self.itmax
   21569             :  *         cdef long init  = self.init             # <<<<<<<<<<<<<<
   21570             :  *         cdef double flt1 = 0.0
   21571             :  *         cdef double flt2 = 0.0
   21572             :  */
   21573         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
   21574         188 :   __Pyx_GOTREF(__pyx_t_1);
   21575         188 :   __pyx_t_3 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_3 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error)
   21576         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21577         188 :   __pyx_v_init = __pyx_t_3;
   21578             : 
   21579             :   /* "scipy/optimize/_trlib/_trlib.pyx":67
   21580             :  *         cdef long itmax = self.itmax
   21581             :  *         cdef long init  = self.init
   21582             :  *         cdef double flt1 = 0.0             # <<<<<<<<<<<<<<
   21583             :  *         cdef double flt2 = 0.0
   21584             :  *         cdef double flt3 = 0.0
   21585             :  */
   21586         188 :   __pyx_v_flt1 = 0.0;
   21587             : 
   21588             :   /* "scipy/optimize/_trlib/_trlib.pyx":68
   21589             :  *         cdef long init  = self.init
   21590             :  *         cdef double flt1 = 0.0
   21591             :  *         cdef double flt2 = 0.0             # <<<<<<<<<<<<<<
   21592             :  *         cdef double flt3 = 0.0
   21593             :  *         prefix = b""
   21594             :  */
   21595         188 :   __pyx_v_flt2 = 0.0;
   21596             : 
   21597             :   /* "scipy/optimize/_trlib/_trlib.pyx":69
   21598             :  *         cdef double flt1 = 0.0
   21599             :  *         cdef double flt2 = 0.0
   21600             :  *         cdef double flt3 = 0.0             # <<<<<<<<<<<<<<
   21601             :  *         prefix = b""
   21602             :  *         cdef long   [:] iwork_view  = self.iwork
   21603             :  */
   21604         188 :   __pyx_v_flt3 = 0.0;
   21605             : 
   21606             :   /* "scipy/optimize/_trlib/_trlib.pyx":70
   21607             :  *         cdef double flt2 = 0.0
   21608             :  *         cdef double flt3 = 0.0
   21609             :  *         prefix = b""             # <<<<<<<<<<<<<<
   21610             :  *         cdef long   [:] iwork_view  = self.iwork
   21611             :  *         cdef double [:] fwork_view  = self.fwork
   21612             :  */
   21613         188 :   __Pyx_INCREF(__pyx_kp_b__12);
   21614         188 :   __pyx_v_prefix = __pyx_kp_b__12;
   21615             : 
   21616             :   /* "scipy/optimize/_trlib/_trlib.pyx":71
   21617             :  *         cdef double flt3 = 0.0
   21618             :  *         prefix = b""
   21619             :  *         cdef long   [:] iwork_view  = self.iwork             # <<<<<<<<<<<<<<
   21620             :  *         cdef double [:] fwork_view  = self.fwork
   21621             :  *         cdef long   [:] timing_view = self.timing
   21622             :  */
   21623         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_iwork); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
   21624         188 :   __Pyx_GOTREF(__pyx_t_1);
   21625         188 :   __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 71, __pyx_L1_error)
   21626         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21627         188 :   __pyx_v_iwork_view = __pyx_t_4;
   21628         188 :   __pyx_t_4.memview = NULL;
   21629         188 :   __pyx_t_4.data = NULL;
   21630             : 
   21631             :   /* "scipy/optimize/_trlib/_trlib.pyx":72
   21632             :  *         prefix = b""
   21633             :  *         cdef long   [:] iwork_view  = self.iwork
   21634             :  *         cdef double [:] fwork_view  = self.fwork             # <<<<<<<<<<<<<<
   21635             :  *         cdef long   [:] timing_view = self.timing
   21636             :  *         cdef long   *iwork_ptr = NULL
   21637             :  */
   21638         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fwork); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
   21639         188 :   __Pyx_GOTREF(__pyx_t_1);
   21640         188 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 72, __pyx_L1_error)
   21641         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21642         188 :   __pyx_v_fwork_view = __pyx_t_5;
   21643         188 :   __pyx_t_5.memview = NULL;
   21644         188 :   __pyx_t_5.data = NULL;
   21645             : 
   21646             :   /* "scipy/optimize/_trlib/_trlib.pyx":73
   21647             :  *         cdef long   [:] iwork_view  = self.iwork
   21648             :  *         cdef double [:] fwork_view  = self.fwork
   21649             :  *         cdef long   [:] timing_view = self.timing             # <<<<<<<<<<<<<<
   21650             :  *         cdef long   *iwork_ptr = NULL
   21651             :  *         cdef double *fwork_ptr = NULL
   21652             :  */
   21653         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_timing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
   21654         188 :   __Pyx_GOTREF(__pyx_t_1);
   21655         188 :   __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_ds_long(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 73, __pyx_L1_error)
   21656         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21657         188 :   __pyx_v_timing_view = __pyx_t_4;
   21658         188 :   __pyx_t_4.memview = NULL;
   21659         188 :   __pyx_t_4.data = NULL;
   21660             : 
   21661             :   /* "scipy/optimize/_trlib/_trlib.pyx":74
   21662             :  *         cdef double [:] fwork_view  = self.fwork
   21663             :  *         cdef long   [:] timing_view = self.timing
   21664             :  *         cdef long   *iwork_ptr = NULL             # <<<<<<<<<<<<<<
   21665             :  *         cdef double *fwork_ptr = NULL
   21666             :  *         cdef long   *timing_ptr = NULL
   21667             :  */
   21668         188 :   __pyx_v_iwork_ptr = NULL;
   21669             : 
   21670             :   /* "scipy/optimize/_trlib/_trlib.pyx":75
   21671             :  *         cdef long   [:] timing_view = self.timing
   21672             :  *         cdef long   *iwork_ptr = NULL
   21673             :  *         cdef double *fwork_ptr = NULL             # <<<<<<<<<<<<<<
   21674             :  *         cdef long   *timing_ptr = NULL
   21675             :  * 
   21676             :  */
   21677         188 :   __pyx_v_fwork_ptr = NULL;
   21678             : 
   21679             :   /* "scipy/optimize/_trlib/_trlib.pyx":76
   21680             :  *         cdef long   *iwork_ptr = NULL
   21681             :  *         cdef double *fwork_ptr = NULL
   21682             :  *         cdef long   *timing_ptr = NULL             # <<<<<<<<<<<<<<
   21683             :  * 
   21684             :  *         if self.disp:
   21685             :  */
   21686         188 :   __pyx_v_timing_ptr = NULL;
   21687             : 
   21688             :   /* "scipy/optimize/_trlib/_trlib.pyx":78
   21689             :  *         cdef long   *timing_ptr = NULL
   21690             :  * 
   21691             :  *         if self.disp:             # <<<<<<<<<<<<<<
   21692             :  *             verbose = 2
   21693             :  * 
   21694             :  */
   21695         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
   21696         188 :   __Pyx_GOTREF(__pyx_t_1);
   21697         188 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 78, __pyx_L1_error)
   21698         188 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21699         188 :   if (__pyx_t_6) {
   21700             : 
   21701             :     /* "scipy/optimize/_trlib/_trlib.pyx":79
   21702             :  * 
   21703             :  *         if self.disp:
   21704             :  *             verbose = 2             # <<<<<<<<<<<<<<
   21705             :  * 
   21706             :  *         if iwork_view.shape[0] > 0:
   21707             :  */
   21708           1 :     __pyx_v_verbose = 2;
   21709             : 
   21710             :     /* "scipy/optimize/_trlib/_trlib.pyx":78
   21711             :  *         cdef long   *timing_ptr = NULL
   21712             :  * 
   21713             :  *         if self.disp:             # <<<<<<<<<<<<<<
   21714             :  *             verbose = 2
   21715             :  * 
   21716             :  */
   21717             :   }
   21718             : 
   21719             :   /* "scipy/optimize/_trlib/_trlib.pyx":81
   21720             :  *             verbose = 2
   21721             :  * 
   21722             :  *         if iwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21723             :  *             iwork_ptr = &iwork_view[0]
   21724             :  *         if fwork_view.shape[0] > 0:
   21725             :  */
   21726         188 :   __pyx_t_6 = ((__pyx_v_iwork_view.shape[0]) > 0);
   21727         188 :   if (__pyx_t_6) {
   21728             : 
   21729             :     /* "scipy/optimize/_trlib/_trlib.pyx":82
   21730             :  * 
   21731             :  *         if iwork_view.shape[0] > 0:
   21732             :  *             iwork_ptr = &iwork_view[0]             # <<<<<<<<<<<<<<
   21733             :  *         if fwork_view.shape[0] > 0:
   21734             :  *             fwork_ptr = &fwork_view[0]
   21735             :  */
   21736         188 :     __pyx_t_7 = 0;
   21737         188 :     __pyx_t_8 = -1;
   21738         188 :     if (__pyx_t_7 < 0) {
   21739             :       __pyx_t_7 += __pyx_v_iwork_view.shape[0];
   21740             :       if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
   21741         188 :     } else if (unlikely(__pyx_t_7 >= __pyx_v_iwork_view.shape[0])) __pyx_t_8 = 0;
   21742         188 :     if (unlikely(__pyx_t_8 != -1)) {
   21743             :       __Pyx_RaiseBufferIndexError(__pyx_t_8);
   21744             :       __PYX_ERR(0, 82, __pyx_L1_error)
   21745             :     }
   21746         188 :     __pyx_v_iwork_ptr = (&(*((long *) ( /* dim=0 */ (__pyx_v_iwork_view.data + __pyx_t_7 * __pyx_v_iwork_view.strides[0]) ))));
   21747             : 
   21748             :     /* "scipy/optimize/_trlib/_trlib.pyx":81
   21749             :  *             verbose = 2
   21750             :  * 
   21751             :  *         if iwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21752             :  *             iwork_ptr = &iwork_view[0]
   21753             :  *         if fwork_view.shape[0] > 0:
   21754             :  */
   21755             :   }
   21756             : 
   21757             :   /* "scipy/optimize/_trlib/_trlib.pyx":83
   21758             :  *         if iwork_view.shape[0] > 0:
   21759             :  *             iwork_ptr = &iwork_view[0]
   21760             :  *         if fwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21761             :  *             fwork_ptr = &fwork_view[0]
   21762             :  *         if timing_view.shape[0] > 0:
   21763             :  */
   21764         188 :   __pyx_t_6 = ((__pyx_v_fwork_view.shape[0]) > 0);
   21765         188 :   if (__pyx_t_6) {
   21766             : 
   21767             :     /* "scipy/optimize/_trlib/_trlib.pyx":84
   21768             :  *             iwork_ptr = &iwork_view[0]
   21769             :  *         if fwork_view.shape[0] > 0:
   21770             :  *             fwork_ptr = &fwork_view[0]             # <<<<<<<<<<<<<<
   21771             :  *         if timing_view.shape[0] > 0:
   21772             :  *             timing_ptr = &timing_view[0]
   21773             :  */
   21774         188 :     __pyx_t_7 = 0;
   21775         188 :     __pyx_t_8 = -1;
   21776         188 :     if (__pyx_t_7 < 0) {
   21777             :       __pyx_t_7 += __pyx_v_fwork_view.shape[0];
   21778             :       if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
   21779         188 :     } else if (unlikely(__pyx_t_7 >= __pyx_v_fwork_view.shape[0])) __pyx_t_8 = 0;
   21780         188 :     if (unlikely(__pyx_t_8 != -1)) {
   21781             :       __Pyx_RaiseBufferIndexError(__pyx_t_8);
   21782             :       __PYX_ERR(0, 84, __pyx_L1_error)
   21783             :     }
   21784         188 :     __pyx_v_fwork_ptr = (&(*((double *) ( /* dim=0 */ (__pyx_v_fwork_view.data + __pyx_t_7 * __pyx_v_fwork_view.strides[0]) ))));
   21785             : 
   21786             :     /* "scipy/optimize/_trlib/_trlib.pyx":83
   21787             :  *         if iwork_view.shape[0] > 0:
   21788             :  *             iwork_ptr = &iwork_view[0]
   21789             :  *         if fwork_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21790             :  *             fwork_ptr = &fwork_view[0]
   21791             :  *         if timing_view.shape[0] > 0:
   21792             :  */
   21793             :   }
   21794             : 
   21795             :   /* "scipy/optimize/_trlib/_trlib.pyx":85
   21796             :  *         if fwork_view.shape[0] > 0:
   21797             :  *             fwork_ptr = &fwork_view[0]
   21798             :  *         if timing_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21799             :  *             timing_ptr = &timing_view[0]
   21800             :  * 
   21801             :  */
   21802         188 :   __pyx_t_6 = ((__pyx_v_timing_view.shape[0]) > 0);
   21803         188 :   if (__pyx_t_6) {
   21804             : 
   21805             :     /* "scipy/optimize/_trlib/_trlib.pyx":86
   21806             :  *             fwork_ptr = &fwork_view[0]
   21807             :  *         if timing_view.shape[0] > 0:
   21808             :  *             timing_ptr = &timing_view[0]             # <<<<<<<<<<<<<<
   21809             :  * 
   21810             :  *         cdef MessageStream messages = MessageStream()
   21811             :  */
   21812           0 :     __pyx_t_7 = 0;
   21813           0 :     __pyx_t_8 = -1;
   21814           0 :     if (__pyx_t_7 < 0) {
   21815             :       __pyx_t_7 += __pyx_v_timing_view.shape[0];
   21816             :       if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
   21817           0 :     } else if (unlikely(__pyx_t_7 >= __pyx_v_timing_view.shape[0])) __pyx_t_8 = 0;
   21818           0 :     if (unlikely(__pyx_t_8 != -1)) {
   21819             :       __Pyx_RaiseBufferIndexError(__pyx_t_8);
   21820             :       __PYX_ERR(0, 86, __pyx_L1_error)
   21821             :     }
   21822           0 :     __pyx_v_timing_ptr = (&(*((long *) ( /* dim=0 */ (__pyx_v_timing_view.data + __pyx_t_7 * __pyx_v_timing_view.strides[0]) ))));
   21823             : 
   21824             :     /* "scipy/optimize/_trlib/_trlib.pyx":85
   21825             :  *         if fwork_view.shape[0] > 0:
   21826             :  *             fwork_ptr = &fwork_view[0]
   21827             :  *         if timing_view.shape[0] > 0:             # <<<<<<<<<<<<<<
   21828             :  *             timing_ptr = &timing_view[0]
   21829             :  * 
   21830             :  */
   21831             :   }
   21832             : 
   21833             :   /* "scipy/optimize/_trlib/_trlib.pyx":88
   21834             :  *             timing_ptr = &timing_view[0]
   21835             :  * 
   21836             :  *         cdef MessageStream messages = MessageStream()             # <<<<<<<<<<<<<<
   21837             :  *         try:
   21838             :  *             while True:
   21839             :  */
   21840         188 :   __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
   21841             :   __Pyx_GOTREF(__pyx_t_1);
   21842         926 :   __pyx_v_messages = ((struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream *)__pyx_t_1);
   21843             :   __pyx_t_1 = 0;
   21844             : 
   21845             :   /* "scipy/optimize/_trlib/_trlib.pyx":89
   21846             :  * 
   21847             :  *         cdef MessageStream messages = MessageStream()
   21848             :  *         try:             # <<<<<<<<<<<<<<
   21849             :  *             while True:
   21850             :  *                 messages.clear()
   21851             :  */
   21852             :   /*try:*/ {
   21853             : 
   21854             :     /* "scipy/optimize/_trlib/_trlib.pyx":90
   21855             :  *         cdef MessageStream messages = MessageStream()
   21856             :  *         try:
   21857             :  *             while True:             # <<<<<<<<<<<<<<
   21858             :  *                 messages.clear()
   21859             :  *                 ret = ctrlib.trlib_krylov_min(init, trust_radius, equality,
   21860             :  */
   21861         926 :     while (1) {
   21862             : 
   21863             :       /* "scipy/optimize/_trlib/_trlib.pyx":91
   21864             :  *         try:
   21865             :  *             while True:
   21866             :  *                 messages.clear()             # <<<<<<<<<<<<<<
   21867             :  *                 ret = ctrlib.trlib_krylov_min(init, trust_radius, equality,
   21868             :  *                           itmax, itmax_lanczos, tol_r_i, tol_a_i,
   21869             :  */
   21870         926 :       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_messages), __pyx_n_s_clear); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 91, __pyx_L8_error)
   21871         926 :       __Pyx_GOTREF(__pyx_t_9);
   21872         926 :       __pyx_t_10 = NULL;
   21873         926 :       __pyx_t_11 = 0;
   21874             :       #if CYTHON_UNPACK_METHODS
   21875         926 :       if (likely(PyMethod_Check(__pyx_t_9))) {
   21876         926 :         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
   21877         926 :         if (likely(__pyx_t_10)) {
   21878         926 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   21879         926 :           __Pyx_INCREF(__pyx_t_10);
   21880         926 :           __Pyx_INCREF(function);
   21881         926 :           __Pyx_DECREF_SET(__pyx_t_9, function);
   21882             :           __pyx_t_11 = 1;
   21883             :         }
   21884             :       }
   21885             :       #endif
   21886             :       {
   21887         926 :         PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
   21888         926 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
   21889         926 :         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   21890         926 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L8_error)
   21891         926 :         __Pyx_GOTREF(__pyx_t_1);
   21892         926 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   21893             :       }
   21894         926 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21895             : 
   21896             :       /* "scipy/optimize/_trlib/_trlib.pyx":97
   21897             :  *                           convexify, earlyterm, g_dot_g, v_dot_g, p_dot_Hp,
   21898             :  *                           iwork_ptr, fwork_ptr, refine, verbose, unicode,
   21899             :  *                           prefix, messages.handle,             # <<<<<<<<<<<<<<
   21900             :  *                           timing_ptr, &action, &it, &ityp, &flt1, &flt2, &flt3)
   21901             :  *                 if self.disp:
   21902             :  */
   21903         926 :       __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_prefix); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L8_error)
   21904             : 
   21905             :       /* "scipy/optimize/_trlib/_trlib.pyx":92
   21906             :  *             while True:
   21907             :  *                 messages.clear()
   21908             :  *                 ret = ctrlib.trlib_krylov_min(init, trust_radius, equality,             # <<<<<<<<<<<<<<
   21909             :  *                           itmax, itmax_lanczos, tol_r_i, tol_a_i,
   21910             :  *                           tol_r_b, tol_a_b, zero, obj_lb, ctl_invariant,
   21911             :  */
   21912         926 :       __pyx_v_ret = trlib_krylov_min(__pyx_v_init, __pyx_v_trust_radius, __pyx_v_equality, __pyx_v_itmax, __pyx_v_itmax_lanczos, __pyx_v_tol_r_i, __pyx_v_tol_a_i, __pyx_v_tol_r_b, __pyx_v_tol_a_b, __pyx_v_zero, __pyx_v_obj_lb, __pyx_v_ctl_invariant, __pyx_v_convexify, __pyx_v_earlyterm, __pyx_v_g_dot_g, __pyx_v_v_dot_g, __pyx_v_p_dot_Hp, __pyx_v_iwork_ptr, __pyx_v_fwork_ptr, __pyx_v_refine, __pyx_v_verbose, __pyx_v_unicode, __pyx_t_12, __pyx_v_messages->handle, __pyx_v_timing_ptr, (&__pyx_v_action), (&__pyx_v_it), (&__pyx_v_ityp), (&__pyx_v_flt1), (&__pyx_v_flt2), (&__pyx_v_flt3));
   21913             : 
   21914             :       /* "scipy/optimize/_trlib/_trlib.pyx":99
   21915             :  *                           prefix, messages.handle,
   21916             :  *                           timing_ptr, &action, &it, &ityp, &flt1, &flt2, &flt3)
   21917             :  *                 if self.disp:             # <<<<<<<<<<<<<<
   21918             :  *                     msg = messages.get()
   21919             :  *                     if msg:
   21920             :  */
   21921         926 :       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_disp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L8_error)
   21922         926 :       __Pyx_GOTREF(__pyx_t_1);
   21923         926 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 99, __pyx_L8_error)
   21924         926 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21925         926 :       if (__pyx_t_6) {
   21926             : 
   21927             :         /* "scipy/optimize/_trlib/_trlib.pyx":100
   21928             :  *                           timing_ptr, &action, &it, &ityp, &flt1, &flt2, &flt3)
   21929             :  *                 if self.disp:
   21930             :  *                     msg = messages.get()             # <<<<<<<<<<<<<<
   21931             :  *                     if msg:
   21932             :  *                         print(msg)
   21933             :  */
   21934           4 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_messages), __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L8_error)
   21935           4 :         __Pyx_GOTREF(__pyx_t_9);
   21936           4 :         __pyx_t_10 = NULL;
   21937           4 :         __pyx_t_11 = 0;
   21938             :         #if CYTHON_UNPACK_METHODS
   21939           4 :         if (likely(PyMethod_Check(__pyx_t_9))) {
   21940           4 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
   21941           4 :           if (likely(__pyx_t_10)) {
   21942           4 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   21943           4 :             __Pyx_INCREF(__pyx_t_10);
   21944           4 :             __Pyx_INCREF(function);
   21945           4 :             __Pyx_DECREF_SET(__pyx_t_9, function);
   21946             :             __pyx_t_11 = 1;
   21947             :           }
   21948             :         }
   21949             :         #endif
   21950             :         {
   21951           4 :           PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
   21952           4 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
   21953           4 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   21954           4 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L8_error)
   21955           4 :           __Pyx_GOTREF(__pyx_t_1);
   21956           4 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   21957             :         }
   21958           4 :         __Pyx_XDECREF_SET(__pyx_v_msg, __pyx_t_1);
   21959           4 :         __pyx_t_1 = 0;
   21960             : 
   21961             :         /* "scipy/optimize/_trlib/_trlib.pyx":101
   21962             :  *                 if self.disp:
   21963             :  *                     msg = messages.get()
   21964             :  *                     if msg:             # <<<<<<<<<<<<<<
   21965             :  *                         print(msg)
   21966             :  * 
   21967             :  */
   21968           4 :         __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_msg); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 101, __pyx_L8_error)
   21969           4 :         if (__pyx_t_6) {
   21970             : 
   21971             :           /* "scipy/optimize/_trlib/_trlib.pyx":102
   21972             :  *                     msg = messages.get()
   21973             :  *                     if msg:
   21974             :  *                         print(msg)             # <<<<<<<<<<<<<<
   21975             :  * 
   21976             :  *                 init = 0
   21977             :  */
   21978           1 :           __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_v_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L8_error)
   21979           1 :           __Pyx_GOTREF(__pyx_t_1);
   21980           1 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21981             : 
   21982             :           /* "scipy/optimize/_trlib/_trlib.pyx":101
   21983             :  *                 if self.disp:
   21984             :  *                     msg = messages.get()
   21985             :  *                     if msg:             # <<<<<<<<<<<<<<
   21986             :  *                         print(msg)
   21987             :  * 
   21988             :  */
   21989             :         }
   21990             : 
   21991             :         /* "scipy/optimize/_trlib/_trlib.pyx":99
   21992             :  *                           prefix, messages.handle,
   21993             :  *                           timing_ptr, &action, &it, &ityp, &flt1, &flt2, &flt3)
   21994             :  *                 if self.disp:             # <<<<<<<<<<<<<<
   21995             :  *                     msg = messages.get()
   21996             :  *                     if msg:
   21997             :  */
   21998             :       }
   21999             : 
   22000             :       /* "scipy/optimize/_trlib/_trlib.pyx":104
   22001             :  *                         print(msg)
   22002             :  * 
   22003             :  *                 init = 0             # <<<<<<<<<<<<<<
   22004             :  *                 if action == ctrlib._TRLIB_CLA_INIT:
   22005             :  *                     self.s[:]  = 0.0
   22006             :  */
   22007         926 :       __pyx_v_init = 0;
   22008             : 
   22009             :       /* "scipy/optimize/_trlib/_trlib.pyx":105
   22010             :  * 
   22011             :  *                 init = 0
   22012             :  *                 if action == ctrlib._TRLIB_CLA_INIT:             # <<<<<<<<<<<<<<
   22013             :  *                     self.s[:]  = 0.0
   22014             :  *                     self.gm[:] = 0.0
   22015             :  */
   22016         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_INIT);
   22017         926 :       if (__pyx_t_6) {
   22018             : 
   22019             :         /* "scipy/optimize/_trlib/_trlib.pyx":106
   22020             :  *                 init = 0
   22021             :  *                 if action == ctrlib._TRLIB_CLA_INIT:
   22022             :  *                     self.s[:]  = 0.0             # <<<<<<<<<<<<<<
   22023             :  *                     self.gm[:] = 0.0
   22024             :  *                     self.g[:]  = self.jac
   22025             :  */
   22026         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L8_error)
   22027         138 :         __Pyx_GOTREF(__pyx_t_1);
   22028         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 106, __pyx_L8_error)
   22029         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22030             : 
   22031             :         /* "scipy/optimize/_trlib/_trlib.pyx":107
   22032             :  *                 if action == ctrlib._TRLIB_CLA_INIT:
   22033             :  *                     self.s[:]  = 0.0
   22034             :  *                     self.gm[:] = 0.0             # <<<<<<<<<<<<<<
   22035             :  *                     self.g[:]  = self.jac
   22036             :  *                     self.v[:]  = self.g
   22037             :  */
   22038         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L8_error)
   22039         138 :         __Pyx_GOTREF(__pyx_t_1);
   22040         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_float_0_0, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 107, __pyx_L8_error)
   22041         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22042             : 
   22043             :         /* "scipy/optimize/_trlib/_trlib.pyx":108
   22044             :  *                     self.s[:]  = 0.0
   22045             :  *                     self.gm[:] = 0.0
   22046             :  *                     self.g[:]  = self.jac             # <<<<<<<<<<<<<<
   22047             :  *                     self.v[:]  = self.g
   22048             :  *                     g_dot_g = np.dot(self.g, self.g)
   22049             :  */
   22050         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L8_error)
   22051         138 :         __Pyx_GOTREF(__pyx_t_1);
   22052         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L8_error)
   22053         138 :         __Pyx_GOTREF(__pyx_t_9);
   22054         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 108, __pyx_L8_error)
   22055         138 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22056         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22057             : 
   22058             :         /* "scipy/optimize/_trlib/_trlib.pyx":109
   22059             :  *                     self.gm[:] = 0.0
   22060             :  *                     self.g[:]  = self.jac
   22061             :  *                     self.v[:]  = self.g             # <<<<<<<<<<<<<<
   22062             :  *                     g_dot_g = np.dot(self.g, self.g)
   22063             :  *                     v_dot_g = np.dot(self.v, self.g)
   22064             :  */
   22065         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L8_error)
   22066         138 :         __Pyx_GOTREF(__pyx_t_1);
   22067         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 109, __pyx_L8_error)
   22068         138 :         __Pyx_GOTREF(__pyx_t_9);
   22069         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 109, __pyx_L8_error)
   22070         138 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22071         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22072             : 
   22073             :         /* "scipy/optimize/_trlib/_trlib.pyx":110
   22074             :  *                     self.g[:]  = self.jac
   22075             :  *                     self.v[:]  = self.g
   22076             :  *                     g_dot_g = np.dot(self.g, self.g)             # <<<<<<<<<<<<<<
   22077             :  *                     v_dot_g = np.dot(self.v, self.g)
   22078             :  *                     self.p[:]  = - self.v
   22079             :  */
   22080         138 :         __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L8_error)
   22081         138 :         __Pyx_GOTREF(__pyx_t_9);
   22082         138 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_dot); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 110, __pyx_L8_error)
   22083         138 :         __Pyx_GOTREF(__pyx_t_10);
   22084         138 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22085         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 110, __pyx_L8_error)
   22086         138 :         __Pyx_GOTREF(__pyx_t_9);
   22087         138 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 110, __pyx_L8_error)
   22088         138 :         __Pyx_GOTREF(__pyx_t_13);
   22089         138 :         __pyx_t_14 = NULL;
   22090         138 :         __pyx_t_11 = 0;
   22091             :         #if CYTHON_UNPACK_METHODS
   22092         138 :         if (unlikely(PyMethod_Check(__pyx_t_10))) {
   22093           0 :           __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
   22094           0 :           if (likely(__pyx_t_14)) {
   22095           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
   22096           0 :             __Pyx_INCREF(__pyx_t_14);
   22097           0 :             __Pyx_INCREF(function);
   22098           0 :             __Pyx_DECREF_SET(__pyx_t_10, function);
   22099             :             __pyx_t_11 = 1;
   22100             :           }
   22101             :         }
   22102             :         #endif
   22103             :         {
   22104         138 :           PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_9, __pyx_t_13};
   22105         138 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22106         138 :           __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   22107         138 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22108         138 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22109         138 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L8_error)
   22110         138 :           __Pyx_GOTREF(__pyx_t_1);
   22111         138 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22112             :         }
   22113         138 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L8_error)
   22114         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22115         138 :         __pyx_v_g_dot_g = __pyx_t_2;
   22116             : 
   22117             :         /* "scipy/optimize/_trlib/_trlib.pyx":111
   22118             :  *                     self.v[:]  = self.g
   22119             :  *                     g_dot_g = np.dot(self.g, self.g)
   22120             :  *                     v_dot_g = np.dot(self.v, self.g)             # <<<<<<<<<<<<<<
   22121             :  *                     self.p[:]  = - self.v
   22122             :  *                     self.Hp[:] = self.hessp(self.p)
   22123             :  */
   22124         138 :         __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L8_error)
   22125         138 :         __Pyx_GOTREF(__pyx_t_10);
   22126         138 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_dot); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 111, __pyx_L8_error)
   22127         138 :         __Pyx_GOTREF(__pyx_t_13);
   22128         138 :         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22129         138 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L8_error)
   22130         138 :         __Pyx_GOTREF(__pyx_t_10);
   22131         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L8_error)
   22132         138 :         __Pyx_GOTREF(__pyx_t_9);
   22133         138 :         __pyx_t_14 = NULL;
   22134         138 :         __pyx_t_11 = 0;
   22135             :         #if CYTHON_UNPACK_METHODS
   22136         138 :         if (unlikely(PyMethod_Check(__pyx_t_13))) {
   22137           0 :           __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
   22138           0 :           if (likely(__pyx_t_14)) {
   22139           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
   22140           0 :             __Pyx_INCREF(__pyx_t_14);
   22141           0 :             __Pyx_INCREF(function);
   22142           0 :             __Pyx_DECREF_SET(__pyx_t_13, function);
   22143             :             __pyx_t_11 = 1;
   22144             :           }
   22145             :         }
   22146             :         #endif
   22147             :         {
   22148         138 :           PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_10, __pyx_t_9};
   22149         138 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22150         138 :           __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   22151         138 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22152         138 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22153         138 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L8_error)
   22154         138 :           __Pyx_GOTREF(__pyx_t_1);
   22155         138 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22156             :         }
   22157         138 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 111, __pyx_L8_error)
   22158         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22159         138 :         __pyx_v_v_dot_g = __pyx_t_2;
   22160             : 
   22161             :         /* "scipy/optimize/_trlib/_trlib.pyx":112
   22162             :  *                     g_dot_g = np.dot(self.g, self.g)
   22163             :  *                     v_dot_g = np.dot(self.v, self.g)
   22164             :  *                     self.p[:]  = - self.v             # <<<<<<<<<<<<<<
   22165             :  *                     self.Hp[:] = self.hessp(self.p)
   22166             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22167             :  */
   22168         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L8_error)
   22169         138 :         __Pyx_GOTREF(__pyx_t_1);
   22170         138 :         __pyx_t_13 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L8_error)
   22171         138 :         __Pyx_GOTREF(__pyx_t_13);
   22172         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22173         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L8_error)
   22174         138 :         __Pyx_GOTREF(__pyx_t_1);
   22175         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_13, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 112, __pyx_L8_error)
   22176         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22177         138 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22178             : 
   22179             :         /* "scipy/optimize/_trlib/_trlib.pyx":113
   22180             :  *                     v_dot_g = np.dot(self.v, self.g)
   22181             :  *                     self.p[:]  = - self.v
   22182             :  *                     self.Hp[:] = self.hessp(self.p)             # <<<<<<<<<<<<<<
   22183             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22184             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22185             :  */
   22186         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hessp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L8_error)
   22187         138 :         __Pyx_GOTREF(__pyx_t_1);
   22188         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L8_error)
   22189         138 :         __Pyx_GOTREF(__pyx_t_9);
   22190         138 :         __pyx_t_10 = NULL;
   22191         138 :         __pyx_t_11 = 0;
   22192             :         #if CYTHON_UNPACK_METHODS
   22193         138 :         if (likely(PyMethod_Check(__pyx_t_1))) {
   22194         138 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
   22195         138 :           if (likely(__pyx_t_10)) {
   22196         138 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   22197         138 :             __Pyx_INCREF(__pyx_t_10);
   22198         138 :             __Pyx_INCREF(function);
   22199         138 :             __Pyx_DECREF_SET(__pyx_t_1, function);
   22200             :             __pyx_t_11 = 1;
   22201             :           }
   22202             :         }
   22203             :         #endif
   22204             :         {
   22205         138 :           PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
   22206         138 :           __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
   22207         138 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22208         138 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22209         138 :           if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 113, __pyx_L8_error)
   22210         138 :           __Pyx_GOTREF(__pyx_t_13);
   22211         138 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22212             :         }
   22213         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L8_error)
   22214         138 :         __Pyx_GOTREF(__pyx_t_1);
   22215         138 :         if (__Pyx_PyObject_SetSlice(__pyx_t_1, __pyx_t_13, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 113, __pyx_L8_error)
   22216         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22217         138 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22218             : 
   22219             :         /* "scipy/optimize/_trlib/_trlib.pyx":114
   22220             :  *                     self.p[:]  = - self.v
   22221             :  *                     self.Hp[:] = self.hessp(self.p)
   22222             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)             # <<<<<<<<<<<<<<
   22223             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22224             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   22225             :  */
   22226         138 :         __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L8_error)
   22227         138 :         __Pyx_GOTREF(__pyx_t_1);
   22228         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L8_error)
   22229         138 :         __Pyx_GOTREF(__pyx_t_9);
   22230         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22231         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L8_error)
   22232         138 :         __Pyx_GOTREF(__pyx_t_1);
   22233         138 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 114, __pyx_L8_error)
   22234         138 :         __Pyx_GOTREF(__pyx_t_10);
   22235         138 :         __pyx_t_14 = NULL;
   22236         138 :         __pyx_t_11 = 0;
   22237             :         #if CYTHON_UNPACK_METHODS
   22238         138 :         if (unlikely(PyMethod_Check(__pyx_t_9))) {
   22239           0 :           __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
   22240           0 :           if (likely(__pyx_t_14)) {
   22241           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   22242           0 :             __Pyx_INCREF(__pyx_t_14);
   22243           0 :             __Pyx_INCREF(function);
   22244           0 :             __Pyx_DECREF_SET(__pyx_t_9, function);
   22245             :             __pyx_t_11 = 1;
   22246             :           }
   22247             :         }
   22248             :         #endif
   22249             :         {
   22250         138 :           PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_1, __pyx_t_10};
   22251         138 :           __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22252         138 :           __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   22253         138 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22254         138 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22255         138 :           if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 114, __pyx_L8_error)
   22256         138 :           __Pyx_GOTREF(__pyx_t_13);
   22257         138 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22258             :         }
   22259         138 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_13); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L8_error)
   22260         138 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22261         138 :         __pyx_v_p_dot_Hp = __pyx_t_2;
   22262             : 
   22263             :         /* "scipy/optimize/_trlib/_trlib.pyx":115
   22264             :  *                     self.Hp[:] = self.hessp(self.p)
   22265             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22266             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)             # <<<<<<<<<<<<<<
   22267             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   22268             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22269             :  */
   22270         138 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 115, __pyx_L8_error)
   22271         138 :         __Pyx_GOTREF(__pyx_t_13);
   22272         138 :         __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L8_error)
   22273         138 :         __Pyx_GOTREF(__pyx_t_10);
   22274         138 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L8_error)
   22275         138 :         __Pyx_GOTREF(__pyx_t_1);
   22276         138 :         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22277         138 :         __pyx_t_10 = PyFloat_FromDouble(__pyx_v_v_dot_g); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L8_error)
   22278         138 :         __Pyx_GOTREF(__pyx_t_10);
   22279         138 :         __pyx_t_14 = NULL;
   22280         138 :         __pyx_t_11 = 0;
   22281             :         #if CYTHON_UNPACK_METHODS
   22282         138 :         if (unlikely(PyMethod_Check(__pyx_t_1))) {
   22283           0 :           __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
   22284           0 :           if (likely(__pyx_t_14)) {
   22285           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   22286           0 :             __Pyx_INCREF(__pyx_t_14);
   22287           0 :             __Pyx_INCREF(function);
   22288           0 :             __Pyx_DECREF_SET(__pyx_t_1, function);
   22289             :             __pyx_t_11 = 1;
   22290             :           }
   22291             :         }
   22292             :         #endif
   22293             :         {
   22294         138 :           PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_10};
   22295         138 :           __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
   22296         138 :           __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   22297         138 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22298         138 :           if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 115, __pyx_L8_error)
   22299         138 :           __Pyx_GOTREF(__pyx_t_9);
   22300         138 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22301             :         }
   22302         138 :         __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L8_error)
   22303         138 :         __Pyx_GOTREF(__pyx_t_1);
   22304         138 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22305         138 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22306         138 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Q); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 115, __pyx_L8_error)
   22307         138 :         __Pyx_GOTREF(__pyx_t_9);
   22308         138 :         if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_tuple__13, __pyx_t_1) < 0))) __PYX_ERR(0, 115, __pyx_L8_error)
   22309         138 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22310         138 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22311             : 
   22312             :         /* "scipy/optimize/_trlib/_trlib.pyx":105
   22313             :  * 
   22314             :  *                 init = 0
   22315             :  *                 if action == ctrlib._TRLIB_CLA_INIT:             # <<<<<<<<<<<<<<
   22316             :  *                     self.s[:]  = 0.0
   22317             :  *                     self.gm[:] = 0.0
   22318             :  */
   22319             :       }
   22320             : 
   22321             :       /* "scipy/optimize/_trlib/_trlib.pyx":116
   22322             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22323             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22324             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:             # <<<<<<<<<<<<<<
   22325             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22326             :  *                                        self.Q[:it+1,:])
   22327             :  */
   22328         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_RETRANSF);
   22329         926 :       if (__pyx_t_6) {
   22330             : 
   22331             :         /* "scipy/optimize/_trlib/_trlib.pyx":117
   22332             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22333             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   22334             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],             # <<<<<<<<<<<<<<
   22335             :  *                                        self.Q[:it+1,:])
   22336             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22337             :  */
   22338          91 :         __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L8_error)
   22339          91 :         __Pyx_GOTREF(__pyx_t_9);
   22340          91 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_dot); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L8_error)
   22341          91 :         __Pyx_GOTREF(__pyx_t_13);
   22342          91 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22343          91 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fwork); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L8_error)
   22344          91 :         __Pyx_GOTREF(__pyx_t_9);
   22345          91 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h_pointer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 117, __pyx_L8_error)
   22346          91 :         __Pyx_GOTREF(__pyx_t_10);
   22347          91 :         __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_h_pointer); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 117, __pyx_L8_error)
   22348          91 :         __Pyx_GOTREF(__pyx_t_14);
   22349          91 :         __pyx_t_15 = __Pyx_PyInt_From_long(__pyx_v_it); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 117, __pyx_L8_error)
   22350          91 :         __Pyx_GOTREF(__pyx_t_15);
   22351          91 :         __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 117, __pyx_L8_error)
   22352          91 :         __Pyx_GOTREF(__pyx_t_16);
   22353          91 :         __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
   22354          91 :         __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
   22355          91 :         __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_16, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 117, __pyx_L8_error)
   22356          91 :         __Pyx_GOTREF(__pyx_t_15);
   22357          91 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22358          91 :         __pyx_t_16 = __Pyx_PyObject_GetSlice(__pyx_t_9, 0, 0, &__pyx_t_10, &__pyx_t_15, NULL, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 117, __pyx_L8_error)
   22359          91 :         __Pyx_GOTREF(__pyx_t_16);
   22360          91 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22361          91 :         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22362          91 :         __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
   22363             : 
   22364             :         /* "scipy/optimize/_trlib/_trlib.pyx":118
   22365             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   22366             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22367             :  *                                        self.Q[:it+1,:])             # <<<<<<<<<<<<<<
   22368             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22369             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22370             :  */
   22371          91 :         __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Q); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 118, __pyx_L8_error)
   22372          91 :         __Pyx_GOTREF(__pyx_t_15);
   22373          91 :         __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_it + 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 118, __pyx_L8_error)
   22374          91 :         __Pyx_GOTREF(__pyx_t_10);
   22375          91 :         __pyx_t_9 = PySlice_New(Py_None, __pyx_t_10, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 118, __pyx_L8_error)
   22376          91 :         __Pyx_GOTREF(__pyx_t_9);
   22377          91 :         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22378          91 :         __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 118, __pyx_L8_error)
   22379          91 :         __Pyx_GOTREF(__pyx_t_10);
   22380          91 :         __Pyx_GIVEREF(__pyx_t_9);
   22381          91 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9)) __PYX_ERR(0, 118, __pyx_L8_error);
   22382          91 :         __Pyx_INCREF(__pyx_slice__5);
   22383          91 :         __Pyx_GIVEREF(__pyx_slice__5);
   22384          91 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_slice__5)) __PYX_ERR(0, 118, __pyx_L8_error);
   22385          91 :         __pyx_t_9 = 0;
   22386          91 :         __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 118, __pyx_L8_error)
   22387          91 :         __Pyx_GOTREF(__pyx_t_9);
   22388          91 :         __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
   22389          91 :         __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22390          91 :         __pyx_t_10 = NULL;
   22391          91 :         __pyx_t_11 = 0;
   22392             :         #if CYTHON_UNPACK_METHODS
   22393          91 :         if (unlikely(PyMethod_Check(__pyx_t_13))) {
   22394           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
   22395           0 :           if (likely(__pyx_t_10)) {
   22396           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
   22397           0 :             __Pyx_INCREF(__pyx_t_10);
   22398           0 :             __Pyx_INCREF(function);
   22399           0 :             __Pyx_DECREF_SET(__pyx_t_13, function);
   22400             :             __pyx_t_11 = 1;
   22401             :           }
   22402             :         }
   22403             :         #endif
   22404             :         {
   22405          91 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_16, __pyx_t_9};
   22406          91 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22407          91 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22408          91 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22409          91 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22410          91 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L8_error)
   22411          91 :           __Pyx_GOTREF(__pyx_t_1);
   22412          91 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22413             :         }
   22414             : 
   22415             :         /* "scipy/optimize/_trlib/_trlib.pyx":117
   22416             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22417             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   22418             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],             # <<<<<<<<<<<<<<
   22419             :  *                                        self.Q[:it+1,:])
   22420             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22421             :  */
   22422          91 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L8_error)
   22423          91 :         __Pyx_GOTREF(__pyx_t_13);
   22424          91 :         if (__Pyx_PyObject_SetSlice(__pyx_t_13, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 117, __pyx_L8_error)
   22425          91 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22426          91 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22427             : 
   22428             :         /* "scipy/optimize/_trlib/_trlib.pyx":116
   22429             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22430             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)
   22431             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:             # <<<<<<<<<<<<<<
   22432             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22433             :  *                                        self.Q[:it+1,:])
   22434             :  */
   22435             :       }
   22436             : 
   22437             :       /* "scipy/optimize/_trlib/_trlib.pyx":119
   22438             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22439             :  *                                        self.Q[:it+1,:])
   22440             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:             # <<<<<<<<<<<<<<
   22441             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22442             :  *                         self.s += flt1 * self.p
   22443             :  */
   22444         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_UPDATE_STATIO);
   22445         926 :       if (__pyx_t_6) {
   22446             : 
   22447             :         /* "scipy/optimize/_trlib/_trlib.pyx":120
   22448             :  *                                        self.Q[:it+1,:])
   22449             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22450             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:             # <<<<<<<<<<<<<<
   22451             :  *                         self.s += flt1 * self.p
   22452             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22453             :  */
   22454         183 :         __pyx_t_6 = (__pyx_v_ityp == TRLIB_CLT_CG);
   22455         183 :         if (__pyx_t_6) {
   22456             : 
   22457             :           /* "scipy/optimize/_trlib/_trlib.pyx":121
   22458             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22459             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22460             :  *                         self.s += flt1 * self.p             # <<<<<<<<<<<<<<
   22461             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22462             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22463             :  */
   22464         183 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L8_error)
   22465         183 :           __Pyx_GOTREF(__pyx_t_1);
   22466         183 :           __pyx_t_13 = PyFloat_FromDouble(__pyx_v_flt1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L8_error)
   22467         183 :           __Pyx_GOTREF(__pyx_t_13);
   22468         183 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L8_error)
   22469         183 :           __Pyx_GOTREF(__pyx_t_9);
   22470         183 :           __pyx_t_16 = PyNumber_Multiply(__pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 121, __pyx_L8_error)
   22471         183 :           __Pyx_GOTREF(__pyx_t_16);
   22472         183 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22473         183 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22474         183 :           __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L8_error)
   22475         183 :           __Pyx_GOTREF(__pyx_t_9);
   22476         183 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22477         183 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22478         183 :           if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_s, __pyx_t_9) < 0) __PYX_ERR(0, 121, __pyx_L8_error)
   22479         183 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22480             : 
   22481             :           /* "scipy/optimize/_trlib/_trlib.pyx":120
   22482             :  *                                        self.Q[:it+1,:])
   22483             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:
   22484             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:             # <<<<<<<<<<<<<<
   22485             :  *                         self.s += flt1 * self.p
   22486             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22487             :  */
   22488             :         }
   22489             : 
   22490             :         /* "scipy/optimize/_trlib/_trlib.pyx":119
   22491             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   22492             :  *                                        self.Q[:it+1,:])
   22493             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_STATIO:             # <<<<<<<<<<<<<<
   22494             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22495             :  *                         self.s += flt1 * self.p
   22496             :  */
   22497             :       }
   22498             : 
   22499             :       /* "scipy/optimize/_trlib/_trlib.pyx":122
   22500             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22501             :  *                         self.s += flt1 * self.p
   22502             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:             # <<<<<<<<<<<<<<
   22503             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22504             :  *                         self.Q[it,:] = flt2*self.v
   22505             :  */
   22506         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_UPDATE_GRAD);
   22507         926 :       if (__pyx_t_6) {
   22508             : 
   22509             :         /* "scipy/optimize/_trlib/_trlib.pyx":123
   22510             :  *                         self.s += flt1 * self.p
   22511             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22512             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:             # <<<<<<<<<<<<<<
   22513             :  *                         self.Q[it,:] = flt2*self.v
   22514             :  *                         self.gm[:] = self.g
   22515             :  */
   22516         232 :         __pyx_t_6 = (__pyx_v_ityp == TRLIB_CLT_CG);
   22517         232 :         if (__pyx_t_6) {
   22518             : 
   22519             :           /* "scipy/optimize/_trlib/_trlib.pyx":124
   22520             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22521             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22522             :  *                         self.Q[it,:] = flt2*self.v             # <<<<<<<<<<<<<<
   22523             :  *                         self.gm[:] = self.g
   22524             :  *                         self.g    += flt1*self.Hp
   22525             :  */
   22526         232 :           __pyx_t_9 = PyFloat_FromDouble(__pyx_v_flt2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 124, __pyx_L8_error)
   22527         232 :           __Pyx_GOTREF(__pyx_t_9);
   22528         232 :           __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 124, __pyx_L8_error)
   22529         232 :           __Pyx_GOTREF(__pyx_t_16);
   22530         232 :           __pyx_t_1 = PyNumber_Multiply(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L8_error)
   22531         232 :           __Pyx_GOTREF(__pyx_t_1);
   22532         232 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22533         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22534         232 :           __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Q); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 124, __pyx_L8_error)
   22535         232 :           __Pyx_GOTREF(__pyx_t_16);
   22536         232 :           __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_v_it); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 124, __pyx_L8_error)
   22537         232 :           __Pyx_GOTREF(__pyx_t_9);
   22538         232 :           __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 124, __pyx_L8_error)
   22539         232 :           __Pyx_GOTREF(__pyx_t_13);
   22540         232 :           __Pyx_GIVEREF(__pyx_t_9);
   22541         232 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9)) __PYX_ERR(0, 124, __pyx_L8_error);
   22542         232 :           __Pyx_INCREF(__pyx_slice__5);
   22543         232 :           __Pyx_GIVEREF(__pyx_slice__5);
   22544         232 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__5)) __PYX_ERR(0, 124, __pyx_L8_error);
   22545         232 :           __pyx_t_9 = 0;
   22546         232 :           if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_t_13, __pyx_t_1) < 0))) __PYX_ERR(0, 124, __pyx_L8_error)
   22547         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22548         232 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22549         232 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22550             : 
   22551             :           /* "scipy/optimize/_trlib/_trlib.pyx":125
   22552             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22553             :  *                         self.Q[it,:] = flt2*self.v
   22554             :  *                         self.gm[:] = self.g             # <<<<<<<<<<<<<<
   22555             :  *                         self.g    += flt1*self.Hp
   22556             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22557             :  */
   22558         232 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L8_error)
   22559         232 :           __Pyx_GOTREF(__pyx_t_1);
   22560         232 :           __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gm); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 125, __pyx_L8_error)
   22561         232 :           __Pyx_GOTREF(__pyx_t_13);
   22562         232 :           if (__Pyx_PyObject_SetSlice(__pyx_t_13, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 125, __pyx_L8_error)
   22563         232 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22564         232 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22565             : 
   22566             :           /* "scipy/optimize/_trlib/_trlib.pyx":126
   22567             :  *                         self.Q[it,:] = flt2*self.v
   22568             :  *                         self.gm[:] = self.g
   22569             :  *                         self.g    += flt1*self.Hp             # <<<<<<<<<<<<<<
   22570             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22571             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm
   22572             :  */
   22573         232 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L8_error)
   22574         232 :           __Pyx_GOTREF(__pyx_t_1);
   22575         232 :           __pyx_t_13 = PyFloat_FromDouble(__pyx_v_flt1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 126, __pyx_L8_error)
   22576         232 :           __Pyx_GOTREF(__pyx_t_13);
   22577         232 :           __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 126, __pyx_L8_error)
   22578         232 :           __Pyx_GOTREF(__pyx_t_16);
   22579         232 :           __pyx_t_9 = PyNumber_Multiply(__pyx_t_13, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 126, __pyx_L8_error)
   22580         232 :           __Pyx_GOTREF(__pyx_t_9);
   22581         232 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22582         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22583         232 :           __pyx_t_16 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 126, __pyx_L8_error)
   22584         232 :           __Pyx_GOTREF(__pyx_t_16);
   22585         232 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22586         232 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22587         232 :           if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_g, __pyx_t_16) < 0) __PYX_ERR(0, 126, __pyx_L8_error)
   22588         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22589             : 
   22590             :           /* "scipy/optimize/_trlib/_trlib.pyx":123
   22591             :  *                         self.s += flt1 * self.p
   22592             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:
   22593             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:             # <<<<<<<<<<<<<<
   22594             :  *                         self.Q[it,:] = flt2*self.v
   22595             :  *                         self.gm[:] = self.g
   22596             :  */
   22597             :         }
   22598             : 
   22599             :         /* "scipy/optimize/_trlib/_trlib.pyx":127
   22600             :  *                         self.gm[:] = self.g
   22601             :  *                         self.g    += flt1*self.Hp
   22602             :  *                     if ityp == ctrlib._TRLIB_CLT_L:             # <<<<<<<<<<<<<<
   22603             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm
   22604             :  *                         self.gm[:] = flt3*self.g
   22605             :  */
   22606         232 :         __pyx_t_6 = (__pyx_v_ityp == TRLIB_CLT_L);
   22607         232 :         if (__pyx_t_6) {
   22608             : 
   22609             :           /* "scipy/optimize/_trlib/_trlib.pyx":128
   22610             :  *                         self.g    += flt1*self.Hp
   22611             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22612             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm             # <<<<<<<<<<<<<<
   22613             :  *                         self.gm[:] = flt3*self.g
   22614             :  *                         self.g[:]  = self.s
   22615             :  */
   22616           0 :           __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 128, __pyx_L8_error)
   22617           0 :           __Pyx_GOTREF(__pyx_t_16);
   22618           0 :           __pyx_t_9 = PyFloat_FromDouble(__pyx_v_flt1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L8_error)
   22619           0 :           __Pyx_GOTREF(__pyx_t_9);
   22620           0 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L8_error)
   22621           0 :           __Pyx_GOTREF(__pyx_t_1);
   22622           0 :           __pyx_t_13 = PyNumber_Multiply(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L8_error)
   22623           0 :           __Pyx_GOTREF(__pyx_t_13);
   22624           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22625           0 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22626           0 :           __pyx_t_1 = PyNumber_Add(__pyx_t_16, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L8_error)
   22627           0 :           __Pyx_GOTREF(__pyx_t_1);
   22628           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22629           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22630           0 :           __pyx_t_13 = PyFloat_FromDouble(__pyx_v_flt2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L8_error)
   22631           0 :           __Pyx_GOTREF(__pyx_t_13);
   22632           0 :           __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gm); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 128, __pyx_L8_error)
   22633           0 :           __Pyx_GOTREF(__pyx_t_16);
   22634           0 :           __pyx_t_9 = PyNumber_Multiply(__pyx_t_13, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L8_error)
   22635           0 :           __Pyx_GOTREF(__pyx_t_9);
   22636           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22637           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22638           0 :           __pyx_t_16 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 128, __pyx_L8_error)
   22639           0 :           __Pyx_GOTREF(__pyx_t_16);
   22640           0 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22641           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22642           0 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L8_error)
   22643           0 :           __Pyx_GOTREF(__pyx_t_9);
   22644           0 :           if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_16, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 128, __pyx_L8_error)
   22645           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22646           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22647             : 
   22648             :           /* "scipy/optimize/_trlib/_trlib.pyx":129
   22649             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22650             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm
   22651             :  *                         self.gm[:] = flt3*self.g             # <<<<<<<<<<<<<<
   22652             :  *                         self.g[:]  = self.s
   22653             :  *                     self.v[:] = self.g
   22654             :  */
   22655           0 :           __pyx_t_16 = PyFloat_FromDouble(__pyx_v_flt3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 129, __pyx_L8_error)
   22656           0 :           __Pyx_GOTREF(__pyx_t_16);
   22657           0 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L8_error)
   22658           0 :           __Pyx_GOTREF(__pyx_t_9);
   22659           0 :           __pyx_t_1 = PyNumber_Multiply(__pyx_t_16, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L8_error)
   22660           0 :           __Pyx_GOTREF(__pyx_t_1);
   22661           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22662           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22663           0 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_gm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L8_error)
   22664           0 :           __Pyx_GOTREF(__pyx_t_9);
   22665           0 :           if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 129, __pyx_L8_error)
   22666           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22667           0 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22668             : 
   22669             :           /* "scipy/optimize/_trlib/_trlib.pyx":130
   22670             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm
   22671             :  *                         self.gm[:] = flt3*self.g
   22672             :  *                         self.g[:]  = self.s             # <<<<<<<<<<<<<<
   22673             :  *                     self.v[:] = self.g
   22674             :  *                     g_dot_g = np.dot(self.g, self.g)
   22675             :  */
   22676           0 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L8_error)
   22677           0 :           __Pyx_GOTREF(__pyx_t_1);
   22678           0 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 130, __pyx_L8_error)
   22679           0 :           __Pyx_GOTREF(__pyx_t_9);
   22680           0 :           if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 130, __pyx_L8_error)
   22681           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22682           0 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22683             : 
   22684             :           /* "scipy/optimize/_trlib/_trlib.pyx":127
   22685             :  *                         self.gm[:] = self.g
   22686             :  *                         self.g    += flt1*self.Hp
   22687             :  *                     if ityp == ctrlib._TRLIB_CLT_L:             # <<<<<<<<<<<<<<
   22688             :  *                         self.s[:]  = self.Hp + flt1*self.g + flt2*self.gm
   22689             :  *                         self.gm[:] = flt3*self.g
   22690             :  */
   22691             :         }
   22692             : 
   22693             :         /* "scipy/optimize/_trlib/_trlib.pyx":131
   22694             :  *                         self.gm[:] = flt3*self.g
   22695             :  *                         self.g[:]  = self.s
   22696             :  *                     self.v[:] = self.g             # <<<<<<<<<<<<<<
   22697             :  *                     g_dot_g = np.dot(self.g, self.g)
   22698             :  *                     v_dot_g = np.dot(self.v, self.g)
   22699             :  */
   22700         232 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L8_error)
   22701         232 :         __Pyx_GOTREF(__pyx_t_1);
   22702         232 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L8_error)
   22703         232 :         __Pyx_GOTREF(__pyx_t_9);
   22704         232 :         if (__Pyx_PyObject_SetSlice(__pyx_t_9, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 131, __pyx_L8_error)
   22705         232 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22706         232 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22707             : 
   22708             :         /* "scipy/optimize/_trlib/_trlib.pyx":132
   22709             :  *                         self.g[:]  = self.s
   22710             :  *                     self.v[:] = self.g
   22711             :  *                     g_dot_g = np.dot(self.g, self.g)             # <<<<<<<<<<<<<<
   22712             :  *                     v_dot_g = np.dot(self.v, self.g)
   22713             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:
   22714             :  */
   22715         232 :         __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L8_error)
   22716         232 :         __Pyx_GOTREF(__pyx_t_9);
   22717         232 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_dot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 132, __pyx_L8_error)
   22718         232 :         __Pyx_GOTREF(__pyx_t_16);
   22719         232 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22720         232 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L8_error)
   22721         232 :         __Pyx_GOTREF(__pyx_t_9);
   22722         232 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 132, __pyx_L8_error)
   22723         232 :         __Pyx_GOTREF(__pyx_t_13);
   22724         232 :         __pyx_t_10 = NULL;
   22725         232 :         __pyx_t_11 = 0;
   22726             :         #if CYTHON_UNPACK_METHODS
   22727         232 :         if (unlikely(PyMethod_Check(__pyx_t_16))) {
   22728           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_16);
   22729           0 :           if (likely(__pyx_t_10)) {
   22730           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
   22731           0 :             __Pyx_INCREF(__pyx_t_10);
   22732           0 :             __Pyx_INCREF(function);
   22733           0 :             __Pyx_DECREF_SET(__pyx_t_16, function);
   22734             :             __pyx_t_11 = 1;
   22735             :           }
   22736             :         }
   22737             :         #endif
   22738             :         {
   22739         232 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_9, __pyx_t_13};
   22740         232 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22741         232 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22742         232 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22743         232 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22744         232 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L8_error)
   22745         232 :           __Pyx_GOTREF(__pyx_t_1);
   22746         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22747             :         }
   22748         232 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L8_error)
   22749         232 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22750         232 :         __pyx_v_g_dot_g = __pyx_t_2;
   22751             : 
   22752             :         /* "scipy/optimize/_trlib/_trlib.pyx":133
   22753             :  *                     self.v[:] = self.g
   22754             :  *                     g_dot_g = np.dot(self.g, self.g)
   22755             :  *                     v_dot_g = np.dot(self.v, self.g)             # <<<<<<<<<<<<<<
   22756             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:
   22757             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p
   22758             :  */
   22759         232 :         __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 133, __pyx_L8_error)
   22760         232 :         __Pyx_GOTREF(__pyx_t_16);
   22761         232 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_dot); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 133, __pyx_L8_error)
   22762         232 :         __Pyx_GOTREF(__pyx_t_13);
   22763         232 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22764         232 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 133, __pyx_L8_error)
   22765         232 :         __Pyx_GOTREF(__pyx_t_16);
   22766         232 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 133, __pyx_L8_error)
   22767         232 :         __Pyx_GOTREF(__pyx_t_9);
   22768         232 :         __pyx_t_10 = NULL;
   22769         232 :         __pyx_t_11 = 0;
   22770             :         #if CYTHON_UNPACK_METHODS
   22771         232 :         if (unlikely(PyMethod_Check(__pyx_t_13))) {
   22772           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
   22773           0 :           if (likely(__pyx_t_10)) {
   22774           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
   22775           0 :             __Pyx_INCREF(__pyx_t_10);
   22776           0 :             __Pyx_INCREF(function);
   22777           0 :             __Pyx_DECREF_SET(__pyx_t_13, function);
   22778             :             __pyx_t_11 = 1;
   22779             :           }
   22780             :         }
   22781             :         #endif
   22782             :         {
   22783         232 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_16, __pyx_t_9};
   22784         232 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22785         232 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22786         232 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22787         232 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22788         232 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L8_error)
   22789         232 :           __Pyx_GOTREF(__pyx_t_1);
   22790         232 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22791             :         }
   22792         232 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L8_error)
   22793         232 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22794             :         __pyx_v_v_dot_g = __pyx_t_2;
   22795             : 
   22796             :         /* "scipy/optimize/_trlib/_trlib.pyx":122
   22797             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22798             :  *                         self.s += flt1 * self.p
   22799             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_GRAD:             # <<<<<<<<<<<<<<
   22800             :  *                     if ityp == ctrlib._TRLIB_CLT_CG:
   22801             :  *                         self.Q[it,:] = flt2*self.v
   22802             :  */
   22803             :       }
   22804             : 
   22805             :       /* "scipy/optimize/_trlib/_trlib.pyx":134
   22806             :  *                     g_dot_g = np.dot(self.g, self.g)
   22807             :  *                     v_dot_g = np.dot(self.v, self.g)
   22808             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:             # <<<<<<<<<<<<<<
   22809             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p
   22810             :  *                     self.Hp[:] = self.hessp(self.p)
   22811             :  */
   22812         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_UPDATE_DIR);
   22813         926 :       if (__pyx_t_6) {
   22814             : 
   22815             :         /* "scipy/optimize/_trlib/_trlib.pyx":135
   22816             :  *                     v_dot_g = np.dot(self.v, self.g)
   22817             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:
   22818             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p             # <<<<<<<<<<<<<<
   22819             :  *                     self.Hp[:] = self.hessp(self.p)
   22820             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22821             :  */
   22822          94 :         __pyx_t_1 = PyFloat_FromDouble(__pyx_v_flt1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L8_error)
   22823          94 :         __Pyx_GOTREF(__pyx_t_1);
   22824          94 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 135, __pyx_L8_error)
   22825          94 :         __Pyx_GOTREF(__pyx_t_13);
   22826          94 :         __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 135, __pyx_L8_error)
   22827          94 :         __Pyx_GOTREF(__pyx_t_9);
   22828          94 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22829          94 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22830          94 :         __pyx_t_13 = PyFloat_FromDouble(__pyx_v_flt2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 135, __pyx_L8_error)
   22831          94 :         __Pyx_GOTREF(__pyx_t_13);
   22832          94 :         __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L8_error)
   22833          94 :         __Pyx_GOTREF(__pyx_t_1);
   22834          94 :         __pyx_t_16 = PyNumber_Multiply(__pyx_t_13, __pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 135, __pyx_L8_error)
   22835          94 :         __Pyx_GOTREF(__pyx_t_16);
   22836          94 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22837          94 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22838          94 :         __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L8_error)
   22839          94 :         __Pyx_GOTREF(__pyx_t_1);
   22840          94 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22841          94 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22842          94 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 135, __pyx_L8_error)
   22843          94 :         __Pyx_GOTREF(__pyx_t_16);
   22844          94 :         if (__Pyx_PyObject_SetSlice(__pyx_t_16, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 135, __pyx_L8_error)
   22845          94 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22846          94 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22847             : 
   22848             :         /* "scipy/optimize/_trlib/_trlib.pyx":136
   22849             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:
   22850             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p
   22851             :  *                     self.Hp[:] = self.hessp(self.p)             # <<<<<<<<<<<<<<
   22852             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22853             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22854             :  */
   22855          94 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hessp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 136, __pyx_L8_error)
   22856          94 :         __Pyx_GOTREF(__pyx_t_16);
   22857          94 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L8_error)
   22858          94 :         __Pyx_GOTREF(__pyx_t_9);
   22859          94 :         __pyx_t_13 = NULL;
   22860          94 :         __pyx_t_11 = 0;
   22861             :         #if CYTHON_UNPACK_METHODS
   22862          94 :         if (likely(PyMethod_Check(__pyx_t_16))) {
   22863          94 :           __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_16);
   22864          94 :           if (likely(__pyx_t_13)) {
   22865          94 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
   22866          94 :             __Pyx_INCREF(__pyx_t_13);
   22867          94 :             __Pyx_INCREF(function);
   22868          94 :             __Pyx_DECREF_SET(__pyx_t_16, function);
   22869             :             __pyx_t_11 = 1;
   22870             :           }
   22871             :         }
   22872             :         #endif
   22873             :         {
   22874          94 :           PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_9};
   22875          94 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
   22876          94 :           __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
   22877          94 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22878          94 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L8_error)
   22879          94 :           __Pyx_GOTREF(__pyx_t_1);
   22880          94 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22881             :         }
   22882          94 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 136, __pyx_L8_error)
   22883          94 :         __Pyx_GOTREF(__pyx_t_16);
   22884          94 :         if (__Pyx_PyObject_SetSlice(__pyx_t_16, __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__5, 0, 0, 1) < 0) __PYX_ERR(0, 136, __pyx_L8_error)
   22885          94 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22886          94 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22887             : 
   22888             :         /* "scipy/optimize/_trlib/_trlib.pyx":137
   22889             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p
   22890             :  *                     self.Hp[:] = self.hessp(self.p)
   22891             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)             # <<<<<<<<<<<<<<
   22892             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22893             :  *                         self.Q[it,:] = self.p
   22894             :  */
   22895          94 :         __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 137, __pyx_L8_error)
   22896          94 :         __Pyx_GOTREF(__pyx_t_16);
   22897          94 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_dot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L8_error)
   22898          94 :         __Pyx_GOTREF(__pyx_t_9);
   22899          94 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22900          94 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 137, __pyx_L8_error)
   22901          94 :         __Pyx_GOTREF(__pyx_t_16);
   22902          94 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Hp); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 137, __pyx_L8_error)
   22903          94 :         __Pyx_GOTREF(__pyx_t_13);
   22904          94 :         __pyx_t_10 = NULL;
   22905          94 :         __pyx_t_11 = 0;
   22906             :         #if CYTHON_UNPACK_METHODS
   22907          94 :         if (unlikely(PyMethod_Check(__pyx_t_9))) {
   22908           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
   22909           0 :           if (likely(__pyx_t_10)) {
   22910           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   22911           0 :             __Pyx_INCREF(__pyx_t_10);
   22912           0 :             __Pyx_INCREF(function);
   22913           0 :             __Pyx_DECREF_SET(__pyx_t_9, function);
   22914             :             __pyx_t_11 = 1;
   22915             :           }
   22916             :         }
   22917             :         #endif
   22918             :         {
   22919          94 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_16, __pyx_t_13};
   22920          94 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   22921          94 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22922          94 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22923          94 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22924          94 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L8_error)
   22925          94 :           __Pyx_GOTREF(__pyx_t_1);
   22926          94 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22927             :         }
   22928          94 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L8_error)
   22929          94 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22930          94 :         __pyx_v_p_dot_Hp = __pyx_t_2;
   22931             : 
   22932             :         /* "scipy/optimize/_trlib/_trlib.pyx":138
   22933             :  *                     self.Hp[:] = self.hessp(self.p)
   22934             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22935             :  *                     if ityp == ctrlib._TRLIB_CLT_L:             # <<<<<<<<<<<<<<
   22936             :  *                         self.Q[it,:] = self.p
   22937             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:
   22938             :  */
   22939          94 :         __pyx_t_6 = (__pyx_v_ityp == TRLIB_CLT_L);
   22940          94 :         if (__pyx_t_6) {
   22941             : 
   22942             :           /* "scipy/optimize/_trlib/_trlib.pyx":139
   22943             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22944             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22945             :  *                         self.Q[it,:] = self.p             # <<<<<<<<<<<<<<
   22946             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:
   22947             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   22948             :  */
   22949           0 :           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L8_error)
   22950           0 :           __Pyx_GOTREF(__pyx_t_1);
   22951           0 :           __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Q); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 139, __pyx_L8_error)
   22952           0 :           __Pyx_GOTREF(__pyx_t_9);
   22953           0 :           __pyx_t_13 = __Pyx_PyInt_From_long(__pyx_v_it); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L8_error)
   22954           0 :           __Pyx_GOTREF(__pyx_t_13);
   22955           0 :           __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L8_error)
   22956           0 :           __Pyx_GOTREF(__pyx_t_16);
   22957           0 :           __Pyx_GIVEREF(__pyx_t_13);
   22958           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13)) __PYX_ERR(0, 139, __pyx_L8_error);
   22959           0 :           __Pyx_INCREF(__pyx_slice__5);
   22960           0 :           __Pyx_GIVEREF(__pyx_slice__5);
   22961           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_slice__5)) __PYX_ERR(0, 139, __pyx_L8_error);
   22962           0 :           __pyx_t_13 = 0;
   22963           0 :           if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_t_16, __pyx_t_1) < 0))) __PYX_ERR(0, 139, __pyx_L8_error)
   22964           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   22965           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   22966           0 :           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22967             : 
   22968             :           /* "scipy/optimize/_trlib/_trlib.pyx":138
   22969             :  *                     self.Hp[:] = self.hessp(self.p)
   22970             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   22971             :  *                     if ityp == ctrlib._TRLIB_CLT_L:             # <<<<<<<<<<<<<<
   22972             :  *                         self.Q[it,:] = self.p
   22973             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:
   22974             :  */
   22975             :         }
   22976             : 
   22977             :         /* "scipy/optimize/_trlib/_trlib.pyx":134
   22978             :  *                     g_dot_g = np.dot(self.g, self.g)
   22979             :  *                     v_dot_g = np.dot(self.v, self.g)
   22980             :  *                 if action == ctrlib._TRLIB_CLA_UPDATE_DIR:             # <<<<<<<<<<<<<<
   22981             :  *                     self.p[:]  = flt1 * self.v + flt2 * self.p
   22982             :  *                     self.Hp[:] = self.hessp(self.p)
   22983             :  */
   22984             :       }
   22985             : 
   22986             :       /* "scipy/optimize/_trlib/_trlib.pyx":140
   22987             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   22988             :  *                         self.Q[it,:] = self.p
   22989             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:             # <<<<<<<<<<<<<<
   22990             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   22991             :  *                     g_dot_g += np.dot(self.s, self.jac)
   22992             :  */
   22993         926 :       __pyx_t_6 = (__pyx_v_action == TRLIB_CLA_OBJVAL);
   22994         926 :       if (__pyx_t_6) {
   22995             : 
   22996             :         /* "scipy/optimize/_trlib/_trlib.pyx":141
   22997             :  *                         self.Q[it,:] = self.p
   22998             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:
   22999             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))             # <<<<<<<<<<<<<<
   23000             :  *                     g_dot_g += np.dot(self.s, self.jac)
   23001             :  *                 if ret < 10:
   23002             :  */
   23003           0 :         __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_np); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 141, __pyx_L8_error)
   23004           0 :         __Pyx_GOTREF(__pyx_t_16);
   23005           0 :         __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_dot); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L8_error)
   23006           0 :         __Pyx_GOTREF(__pyx_t_9);
   23007           0 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23008           0 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 141, __pyx_L8_error)
   23009           0 :         __Pyx_GOTREF(__pyx_t_16);
   23010           0 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_hessp); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 141, __pyx_L8_error)
   23011           0 :         __Pyx_GOTREF(__pyx_t_10);
   23012           0 :         __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 141, __pyx_L8_error)
   23013           0 :         __Pyx_GOTREF(__pyx_t_15);
   23014           0 :         __pyx_t_14 = NULL;
   23015           0 :         __pyx_t_11 = 0;
   23016             :         #if CYTHON_UNPACK_METHODS
   23017           0 :         if (likely(PyMethod_Check(__pyx_t_10))) {
   23018           0 :           __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
   23019           0 :           if (likely(__pyx_t_14)) {
   23020           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
   23021           0 :             __Pyx_INCREF(__pyx_t_14);
   23022           0 :             __Pyx_INCREF(function);
   23023           0 :             __Pyx_DECREF_SET(__pyx_t_10, function);
   23024             :             __pyx_t_11 = 1;
   23025             :           }
   23026             :         }
   23027             :         #endif
   23028             :         {
   23029           0 :           PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
   23030           0 :           __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
   23031           0 :           __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   23032           0 :           __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
   23033           0 :           if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 141, __pyx_L8_error)
   23034           0 :           __Pyx_GOTREF(__pyx_t_13);
   23035           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   23036             :         }
   23037           0 :         __pyx_t_10 = NULL;
   23038           0 :         __pyx_t_11 = 0;
   23039             :         #if CYTHON_UNPACK_METHODS
   23040           0 :         if (unlikely(PyMethod_Check(__pyx_t_9))) {
   23041           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
   23042           0 :           if (likely(__pyx_t_10)) {
   23043           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   23044           0 :             __Pyx_INCREF(__pyx_t_10);
   23045           0 :             __Pyx_INCREF(function);
   23046           0 :             __Pyx_DECREF_SET(__pyx_t_9, function);
   23047             :             __pyx_t_11 = 1;
   23048             :           }
   23049             :         }
   23050             :         #endif
   23051             :         {
   23052           0 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_16, __pyx_t_13};
   23053           0 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   23054           0 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   23055           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23056           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23057           0 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L8_error)
   23058           0 :           __Pyx_GOTREF(__pyx_t_1);
   23059           0 :           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   23060             :         }
   23061           0 :         __pyx_t_9 = PyNumber_Multiply(__pyx_float__5, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L8_error)
   23062           0 :         __Pyx_GOTREF(__pyx_t_9);
   23063           0 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23064           0 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L8_error)
   23065           0 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   23066           0 :         __pyx_v_g_dot_g = __pyx_t_2;
   23067             : 
   23068             :         /* "scipy/optimize/_trlib/_trlib.pyx":142
   23069             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:
   23070             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   23071             :  *                     g_dot_g += np.dot(self.s, self.jac)             # <<<<<<<<<<<<<<
   23072             :  *                 if ret < 10:
   23073             :  *                     break
   23074             :  */
   23075           0 :         __pyx_t_9 = PyFloat_FromDouble(__pyx_v_g_dot_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L8_error)
   23076           0 :         __Pyx_GOTREF(__pyx_t_9);
   23077           0 :         __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 142, __pyx_L8_error)
   23078           0 :         __Pyx_GOTREF(__pyx_t_13);
   23079           0 :         __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_dot); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 142, __pyx_L8_error)
   23080           0 :         __Pyx_GOTREF(__pyx_t_16);
   23081           0 :         __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23082           0 :         __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 142, __pyx_L8_error)
   23083           0 :         __Pyx_GOTREF(__pyx_t_13);
   23084           0 :         __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_jac); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 142, __pyx_L8_error)
   23085           0 :         __Pyx_GOTREF(__pyx_t_10);
   23086           0 :         __pyx_t_15 = NULL;
   23087           0 :         __pyx_t_11 = 0;
   23088             :         #if CYTHON_UNPACK_METHODS
   23089           0 :         if (unlikely(PyMethod_Check(__pyx_t_16))) {
   23090           0 :           __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
   23091           0 :           if (likely(__pyx_t_15)) {
   23092           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
   23093           0 :             __Pyx_INCREF(__pyx_t_15);
   23094           0 :             __Pyx_INCREF(function);
   23095           0 :             __Pyx_DECREF_SET(__pyx_t_16, function);
   23096             :             __pyx_t_11 = 1;
   23097             :           }
   23098             :         }
   23099             :         #endif
   23100             :         {
   23101           0 :           PyObject *__pyx_callargs[3] = {__pyx_t_15, __pyx_t_13, __pyx_t_10};
   23102           0 :           __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
   23103           0 :           __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
   23104           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23105           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   23106           0 :           if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L8_error)
   23107           0 :           __Pyx_GOTREF(__pyx_t_1);
   23108           0 :           __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23109             :         }
   23110           0 :         __pyx_t_16 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 142, __pyx_L8_error)
   23111           0 :         __Pyx_GOTREF(__pyx_t_16);
   23112           0 :         __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   23113           0 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23114           0 :         __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_16); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L8_error)
   23115           0 :         __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23116             :         __pyx_v_g_dot_g = __pyx_t_2;
   23117             : 
   23118             :         /* "scipy/optimize/_trlib/_trlib.pyx":140
   23119             :  *                     if ityp == ctrlib._TRLIB_CLT_L:
   23120             :  *                         self.Q[it,:] = self.p
   23121             :  *                 if action == ctrlib._TRLIB_CLA_OBJVAL:             # <<<<<<<<<<<<<<
   23122             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   23123             :  *                     g_dot_g += np.dot(self.s, self.jac)
   23124             :  */
   23125             :       }
   23126             : 
   23127             :       /* "scipy/optimize/_trlib/_trlib.pyx":143
   23128             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   23129             :  *                     g_dot_g += np.dot(self.s, self.jac)
   23130             :  *                 if ret < 10:             # <<<<<<<<<<<<<<
   23131             :  *                     break
   23132             :  *                 self.init = ctrlib._TRLIB_CLS_HOTSTART
   23133             :  */
   23134         926 :       __pyx_t_6 = (__pyx_v_ret < 10);
   23135         926 :       if (__pyx_t_6) {
   23136             : 
   23137             :         /* "scipy/optimize/_trlib/_trlib.pyx":144
   23138             :  *                     g_dot_g += np.dot(self.s, self.jac)
   23139             :  *                 if ret < 10:
   23140             :  *                     break             # <<<<<<<<<<<<<<
   23141             :  *                 self.init = ctrlib._TRLIB_CLS_HOTSTART
   23142             :  *             self.lam = self.fwork[7]
   23143             :  */
   23144         188 :         goto __pyx_L11_break;
   23145             : 
   23146             :         /* "scipy/optimize/_trlib/_trlib.pyx":143
   23147             :  *                     g_dot_g = .5*np.dot(self.s, self.hessp(self.s))
   23148             :  *                     g_dot_g += np.dot(self.s, self.jac)
   23149             :  *                 if ret < 10:             # <<<<<<<<<<<<<<
   23150             :  *                     break
   23151             :  *                 self.init = ctrlib._TRLIB_CLS_HOTSTART
   23152             :  */
   23153             :       }
   23154             : 
   23155             :       /* "scipy/optimize/_trlib/_trlib.pyx":145
   23156             :  *                 if ret < 10:
   23157             :  *                     break
   23158             :  *                 self.init = ctrlib._TRLIB_CLS_HOTSTART             # <<<<<<<<<<<<<<
   23159             :  *             self.lam = self.fwork[7]
   23160             :  *         finally:
   23161             :  */
   23162         738 :       __pyx_t_16 = __Pyx_PyInt_From_long(TRLIB_CLS_HOTSTART); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 145, __pyx_L8_error)
   23163         738 :       __Pyx_GOTREF(__pyx_t_16);
   23164         738 :       if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_init_2, __pyx_t_16) < 0) __PYX_ERR(0, 145, __pyx_L8_error)
   23165        1664 :       __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23166             :     }
   23167         188 :     __pyx_L11_break:;
   23168             : 
   23169             :     /* "scipy/optimize/_trlib/_trlib.pyx":146
   23170             :  *                     break
   23171             :  *                 self.init = ctrlib._TRLIB_CLS_HOTSTART
   23172             :  *             self.lam = self.fwork[7]             # <<<<<<<<<<<<<<
   23173             :  *         finally:
   23174             :  *             messages.close()
   23175             :  */
   23176         188 :     __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fwork); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 146, __pyx_L8_error)
   23177         188 :     __Pyx_GOTREF(__pyx_t_16);
   23178         188 :     __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_16, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L8_error)
   23179         188 :     __Pyx_GOTREF(__pyx_t_1);
   23180         188 :     __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23181         188 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lam, __pyx_t_1) < 0) __PYX_ERR(0, 146, __pyx_L8_error)
   23182         188 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23183             :   }
   23184             : 
   23185             :   /* "scipy/optimize/_trlib/_trlib.pyx":148
   23186             :  *             self.lam = self.fwork[7]
   23187             :  *         finally:
   23188             :  *             messages.close()             # <<<<<<<<<<<<<<
   23189             :  * 
   23190             :  *         return self.s, self.lam > 0.0
   23191             :  */
   23192             :   /*finally:*/ {
   23193             :     /*normal exit:*/{
   23194         188 :       __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream *)__pyx_v_messages->__pyx_vtab)->close(__pyx_v_messages, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
   23195         188 :       __Pyx_GOTREF(__pyx_t_1);
   23196         188 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23197         188 :       goto __pyx_L9;
   23198             :     }
   23199           0 :     __pyx_L8_error:;
   23200             :     /*exception exit:*/{
   23201           0 :       __Pyx_PyThreadState_declare
   23202           0 :       __Pyx_PyThreadState_assign
   23203           0 :       __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
   23204           0 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   23205           0 :       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   23206           0 :       __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
   23207           0 :       __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
   23208           0 :       __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
   23209           0 :       __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
   23210           0 :       __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   23211           0 :       __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL;
   23212           0 :       __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
   23213           0 :       __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL;
   23214           0 :       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
   23215           0 :       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
   23216           0 :       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
   23217           0 :       __Pyx_XGOTREF(__pyx_t_19);
   23218           0 :       __Pyx_XGOTREF(__pyx_t_20);
   23219           0 :       __Pyx_XGOTREF(__pyx_t_21);
   23220           0 :       __Pyx_XGOTREF(__pyx_t_22);
   23221           0 :       __Pyx_XGOTREF(__pyx_t_23);
   23222           0 :       __Pyx_XGOTREF(__pyx_t_24);
   23223           0 :       __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
   23224             :       {
   23225           0 :         __pyx_t_1 = ((struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream *)__pyx_v_messages->__pyx_vtab)->close(__pyx_v_messages, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L26_error)
   23226           0 :         __Pyx_GOTREF(__pyx_t_1);
   23227           0 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23228             :       }
   23229           0 :       if (PY_MAJOR_VERSION >= 3) {
   23230           0 :         __Pyx_XGIVEREF(__pyx_t_22);
   23231           0 :         __Pyx_XGIVEREF(__pyx_t_23);
   23232           0 :         __Pyx_XGIVEREF(__pyx_t_24);
   23233           0 :         __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
   23234             :       }
   23235           0 :       __Pyx_XGIVEREF(__pyx_t_19);
   23236           0 :       __Pyx_XGIVEREF(__pyx_t_20);
   23237           0 :       __Pyx_XGIVEREF(__pyx_t_21);
   23238           0 :       __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
   23239           0 :       __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
   23240           0 :       __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
   23241           0 :       goto __pyx_L1_error;
   23242           0 :       __pyx_L26_error:;
   23243           0 :       if (PY_MAJOR_VERSION >= 3) {
   23244           0 :         __Pyx_XGIVEREF(__pyx_t_22);
   23245           0 :         __Pyx_XGIVEREF(__pyx_t_23);
   23246           0 :         __Pyx_XGIVEREF(__pyx_t_24);
   23247           0 :         __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
   23248             :       }
   23249           0 :       __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
   23250           0 :       __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
   23251           0 :       __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
   23252           0 :       __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
   23253           0 :       goto __pyx_L1_error;
   23254             :     }
   23255         188 :     __pyx_L9:;
   23256             :   }
   23257             : 
   23258             :   /* "scipy/optimize/_trlib/_trlib.pyx":150
   23259             :  *             messages.close()
   23260             :  * 
   23261             :  *         return self.s, self.lam > 0.0             # <<<<<<<<<<<<<<
   23262             :  */
   23263         188 :   __Pyx_XDECREF(__pyx_r);
   23264         188 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
   23265         188 :   __Pyx_GOTREF(__pyx_t_1);
   23266         188 :   __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lam); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 150, __pyx_L1_error)
   23267         188 :   __Pyx_GOTREF(__pyx_t_16);
   23268         188 :   __pyx_t_9 = PyObject_RichCompare(__pyx_t_16, __pyx_float_0_0, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error)
   23269         188 :   __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
   23270         188 :   __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 150, __pyx_L1_error)
   23271         188 :   __Pyx_GOTREF(__pyx_t_16);
   23272         188 :   __Pyx_GIVEREF(__pyx_t_1);
   23273         188 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error);
   23274         188 :   __Pyx_GIVEREF(__pyx_t_9);
   23275         188 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error);
   23276         188 :   __pyx_t_1 = 0;
   23277         188 :   __pyx_t_9 = 0;
   23278         188 :   __pyx_r = __pyx_t_16;
   23279         188 :   __pyx_t_16 = 0;
   23280         188 :   goto __pyx_L0;
   23281             : 
   23282             :   /* "scipy/optimize/_trlib/_trlib.pyx":42
   23283             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   23284             :  * 
   23285             :  *     def solve(self, double trust_radius):             # <<<<<<<<<<<<<<
   23286             :  * 
   23287             :  *         cdef long equality = 0
   23288             :  */
   23289             : 
   23290             :   /* function exit code */
   23291           0 :   __pyx_L1_error:;
   23292           0 :   __Pyx_XDECREF(__pyx_t_1);
   23293           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   23294           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
   23295           0 :   __Pyx_XDECREF(__pyx_t_9);
   23296           0 :   __Pyx_XDECREF(__pyx_t_10);
   23297           0 :   __Pyx_XDECREF(__pyx_t_13);
   23298           0 :   __Pyx_XDECREF(__pyx_t_14);
   23299           0 :   __Pyx_XDECREF(__pyx_t_15);
   23300           0 :   __Pyx_XDECREF(__pyx_t_16);
   23301           0 :   __Pyx_AddTraceback("scipy.optimize._trlib._trlib.TRLIBQuadraticSubproblem.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23302           0 :   __pyx_r = NULL;
   23303         188 :   __pyx_L0:;
   23304         188 :   __Pyx_XDECREF(__pyx_v_prefix);
   23305         188 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_iwork_view, 1);
   23306         188 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_fwork_view, 1);
   23307         188 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_timing_view, 1);
   23308         188 :   __Pyx_XDECREF((PyObject *)__pyx_v_messages);
   23309         188 :   __Pyx_XDECREF(__pyx_v_msg);
   23310         188 :   __Pyx_XGIVEREF(__pyx_r);
   23311         188 :   __Pyx_RefNannyFinishContext();
   23312         188 :   return __pyx_r;
   23313             : }
   23314             : static struct __pyx_vtabstruct_array __pyx_vtable_array;
   23315             : 
   23316           0 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
   23317           0 :   struct __pyx_array_obj *p;
   23318           0 :   PyObject *o;
   23319             :   #if CYTHON_COMPILING_IN_LIMITED_API
   23320             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   23321             :   o = alloc_func(t, 0);
   23322             :   #else
   23323           0 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   23324           0 :     o = (*t->tp_alloc)(t, 0);
   23325             :   } else {
   23326           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   23327             :   }
   23328           0 :   if (unlikely(!o)) return 0;
   23329             :   #endif
   23330           0 :   p = ((struct __pyx_array_obj *)o);
   23331           0 :   p->__pyx_vtab = __pyx_vtabptr_array;
   23332           0 :   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
   23333           0 :   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
   23334           0 :   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
   23335             :   return o;
   23336           0 :   bad:
   23337           0 :   Py_DECREF(o); o = 0;
   23338             :   return NULL;
   23339             : }
   23340             : 
   23341           0 : static void __pyx_tp_dealloc_array(PyObject *o) {
   23342           0 :   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
   23343             :   #if CYTHON_USE_TP_FINALIZE
   23344           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
   23345           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
   23346           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   23347             :     }
   23348             :   }
   23349             :   #endif
   23350             :   {
   23351           0 :     PyObject *etype, *eval, *etb;
   23352           0 :     PyErr_Fetch(&etype, &eval, &etb);
   23353           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   23354           0 :     __pyx_array___dealloc__(o);
   23355           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   23356           0 :     PyErr_Restore(etype, eval, etb);
   23357             :   }
   23358           0 :   Py_CLEAR(p->mode);
   23359           0 :   Py_CLEAR(p->_format);
   23360             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   23361           0 :   (*Py_TYPE(o)->tp_free)(o);
   23362             :   #else
   23363             :   {
   23364             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   23365             :     if (tp_free) tp_free(o);
   23366             :   }
   23367             :   #endif
   23368             : }
   23369           0 : static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
   23370           0 :   PyObject *r;
   23371           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   23372           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   23373           0 :   Py_DECREF(x);
   23374             :   return r;
   23375             : }
   23376             : 
   23377           0 : static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
   23378           0 :   if (v) {
   23379           0 :     return __pyx_array___setitem__(o, i, v);
   23380             :   }
   23381             :   else {
   23382           0 :     __Pyx_TypeName o_type_name;
   23383           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   23384           0 :     PyErr_Format(PyExc_NotImplementedError,
   23385             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   23386           0 :     __Pyx_DECREF_TypeName(o_type_name);
   23387           0 :     return -1;
   23388             :   }
   23389             : }
   23390             : 
   23391           0 : static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
   23392           0 :   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
   23393           0 :   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   23394           0 :     PyErr_Clear();
   23395           0 :     v = __pyx_array___getattr__(o, n);
   23396             :   }
   23397           0 :   return v;
   23398             : }
   23399             : 
   23400           0 : static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
   23401           0 :   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
   23402             : }
   23403             : 
   23404             : static PyMethodDef __pyx_methods_array[] = {
   23405             :   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
   23406             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23407             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23408             :   {0, 0, 0, 0}
   23409             : };
   23410             : 
   23411             : static struct PyGetSetDef __pyx_getsets_array[] = {
   23412             :   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
   23413             :   {0, 0, 0, 0, 0}
   23414             : };
   23415             : #if CYTHON_USE_TYPE_SPECS
   23416             : #if !CYTHON_COMPILING_IN_LIMITED_API
   23417             : 
   23418             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   23419             :   #if PY_MAJOR_VERSION < 3
   23420             :   0, /*bf_getreadbuffer*/
   23421             :   #endif
   23422             :   #if PY_MAJOR_VERSION < 3
   23423             :   0, /*bf_getwritebuffer*/
   23424             :   #endif
   23425             :   #if PY_MAJOR_VERSION < 3
   23426             :   0, /*bf_getsegcount*/
   23427             :   #endif
   23428             :   #if PY_MAJOR_VERSION < 3
   23429             :   0, /*bf_getcharbuffer*/
   23430             :   #endif
   23431             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   23432             :   0, /*bf_releasebuffer*/
   23433             : };
   23434             : #endif
   23435             : static PyType_Slot __pyx_type___pyx_array_slots[] = {
   23436             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
   23437             :   {Py_sq_length, (void *)__pyx_array___len__},
   23438             :   {Py_sq_item, (void *)__pyx_sq_item_array},
   23439             :   {Py_mp_length, (void *)__pyx_array___len__},
   23440             :   {Py_mp_subscript, (void *)__pyx_array___getitem__},
   23441             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
   23442             :   {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
   23443             :   #if defined(Py_bf_getbuffer)
   23444             :   {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
   23445             :   #endif
   23446             :   {Py_tp_methods, (void *)__pyx_methods_array},
   23447             :   {Py_tp_getset, (void *)__pyx_getsets_array},
   23448             :   {Py_tp_new, (void *)__pyx_tp_new_array},
   23449             :   {0, 0},
   23450             : };
   23451             : static PyType_Spec __pyx_type___pyx_array_spec = {
   23452             :   "scipy.optimize._trlib._trlib.array",
   23453             :   sizeof(struct __pyx_array_obj),
   23454             :   0,
   23455             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
   23456             :   __pyx_type___pyx_array_slots,
   23457             : };
   23458             : #else
   23459             : 
   23460             : static PySequenceMethods __pyx_tp_as_sequence_array = {
   23461             :   __pyx_array___len__, /*sq_length*/
   23462             :   0, /*sq_concat*/
   23463             :   0, /*sq_repeat*/
   23464             :   __pyx_sq_item_array, /*sq_item*/
   23465             :   0, /*sq_slice*/
   23466             :   0, /*sq_ass_item*/
   23467             :   0, /*sq_ass_slice*/
   23468             :   0, /*sq_contains*/
   23469             :   0, /*sq_inplace_concat*/
   23470             :   0, /*sq_inplace_repeat*/
   23471             : };
   23472             : 
   23473             : static PyMappingMethods __pyx_tp_as_mapping_array = {
   23474             :   __pyx_array___len__, /*mp_length*/
   23475             :   __pyx_array___getitem__, /*mp_subscript*/
   23476             :   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
   23477             : };
   23478             : 
   23479             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   23480             :   #if PY_MAJOR_VERSION < 3
   23481             :   0, /*bf_getreadbuffer*/
   23482             :   #endif
   23483             :   #if PY_MAJOR_VERSION < 3
   23484             :   0, /*bf_getwritebuffer*/
   23485             :   #endif
   23486             :   #if PY_MAJOR_VERSION < 3
   23487             :   0, /*bf_getsegcount*/
   23488             :   #endif
   23489             :   #if PY_MAJOR_VERSION < 3
   23490             :   0, /*bf_getcharbuffer*/
   23491             :   #endif
   23492             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   23493             :   0, /*bf_releasebuffer*/
   23494             : };
   23495             : 
   23496             : static PyTypeObject __pyx_type___pyx_array = {
   23497             :   PyVarObject_HEAD_INIT(0, 0)
   23498             :   "scipy.optimize._trlib._trlib.""array", /*tp_name*/
   23499             :   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
   23500             :   0, /*tp_itemsize*/
   23501             :   __pyx_tp_dealloc_array, /*tp_dealloc*/
   23502             :   #if PY_VERSION_HEX < 0x030800b4
   23503             :   0, /*tp_print*/
   23504             :   #endif
   23505             :   #if PY_VERSION_HEX >= 0x030800b4
   23506             :   0, /*tp_vectorcall_offset*/
   23507             :   #endif
   23508             :   0, /*tp_getattr*/
   23509             :   0, /*tp_setattr*/
   23510             :   #if PY_MAJOR_VERSION < 3
   23511             :   0, /*tp_compare*/
   23512             :   #endif
   23513             :   #if PY_MAJOR_VERSION >= 3
   23514             :   0, /*tp_as_async*/
   23515             :   #endif
   23516             :   0, /*tp_repr*/
   23517             :   0, /*tp_as_number*/
   23518             :   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
   23519             :   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
   23520             :   0, /*tp_hash*/
   23521             :   0, /*tp_call*/
   23522             :   0, /*tp_str*/
   23523             :   __pyx_tp_getattro_array, /*tp_getattro*/
   23524             :   0, /*tp_setattro*/
   23525             :   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
   23526             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   23527             :   0, /*tp_doc*/
   23528             :   0, /*tp_traverse*/
   23529             :   0, /*tp_clear*/
   23530             :   0, /*tp_richcompare*/
   23531             :   0, /*tp_weaklistoffset*/
   23532             :   0, /*tp_iter*/
   23533             :   0, /*tp_iternext*/
   23534             :   __pyx_methods_array, /*tp_methods*/
   23535             :   0, /*tp_members*/
   23536             :   __pyx_getsets_array, /*tp_getset*/
   23537             :   0, /*tp_base*/
   23538             :   0, /*tp_dict*/
   23539             :   0, /*tp_descr_get*/
   23540             :   0, /*tp_descr_set*/
   23541             :   #if !CYTHON_USE_TYPE_SPECS
   23542             :   0, /*tp_dictoffset*/
   23543             :   #endif
   23544             :   0, /*tp_init*/
   23545             :   0, /*tp_alloc*/
   23546             :   __pyx_tp_new_array, /*tp_new*/
   23547             :   0, /*tp_free*/
   23548             :   0, /*tp_is_gc*/
   23549             :   0, /*tp_bases*/
   23550             :   0, /*tp_mro*/
   23551             :   0, /*tp_cache*/
   23552             :   0, /*tp_subclasses*/
   23553             :   0, /*tp_weaklist*/
   23554             :   0, /*tp_del*/
   23555             :   0, /*tp_version_tag*/
   23556             :   #if PY_VERSION_HEX >= 0x030400a1
   23557             :   #if CYTHON_USE_TP_FINALIZE
   23558             :   0, /*tp_finalize*/
   23559             :   #else
   23560             :   NULL, /*tp_finalize*/
   23561             :   #endif
   23562             :   #endif
   23563             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   23564             :   0, /*tp_vectorcall*/
   23565             :   #endif
   23566             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   23567             :   0, /*tp_print*/
   23568             :   #endif
   23569             :   #if PY_VERSION_HEX >= 0x030C0000
   23570             :   0, /*tp_watched*/
   23571             :   #endif
   23572             :   #if PY_VERSION_HEX >= 0x030d00A4
   23573             :   0, /*tp_versions_used*/
   23574             :   #endif
   23575             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   23576             :   0, /*tp_pypy_flags*/
   23577             :   #endif
   23578             : };
   23579             : #endif
   23580             : 
   23581          15 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
   23582          15 :   struct __pyx_MemviewEnum_obj *p;
   23583          15 :   PyObject *o;
   23584             :   #if CYTHON_COMPILING_IN_LIMITED_API
   23585             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   23586             :   o = alloc_func(t, 0);
   23587             :   #else
   23588          15 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   23589          15 :     o = (*t->tp_alloc)(t, 0);
   23590             :   } else {
   23591           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   23592             :   }
   23593          15 :   if (unlikely(!o)) return 0;
   23594             :   #endif
   23595          15 :   p = ((struct __pyx_MemviewEnum_obj *)o);
   23596          15 :   p->name = Py_None; Py_INCREF(Py_None);
   23597             :   return o;
   23598             : }
   23599             : 
   23600           0 : static void __pyx_tp_dealloc_Enum(PyObject *o) {
   23601           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   23602             :   #if CYTHON_USE_TP_FINALIZE
   23603           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   23604           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
   23605           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   23606             :     }
   23607             :   }
   23608             :   #endif
   23609           0 :   PyObject_GC_UnTrack(o);
   23610           0 :   Py_CLEAR(p->name);
   23611             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   23612           0 :   (*Py_TYPE(o)->tp_free)(o);
   23613             :   #else
   23614             :   {
   23615             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   23616             :     if (tp_free) tp_free(o);
   23617             :   }
   23618             :   #endif
   23619             : }
   23620             : 
   23621         805 : static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
   23622         805 :   int e;
   23623         805 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   23624         805 :   if (p->name) {
   23625         805 :     e = (*v)(p->name, a); if (e) return e;
   23626             :   }
   23627             :   return 0;
   23628             : }
   23629             : 
   23630           0 : static int __pyx_tp_clear_Enum(PyObject *o) {
   23631           0 :   PyObject* tmp;
   23632           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   23633           0 :   tmp = ((PyObject*)p->name);
   23634           0 :   p->name = Py_None; Py_INCREF(Py_None);
   23635           0 :   Py_XDECREF(tmp);
   23636           0 :   return 0;
   23637             : }
   23638             : 
   23639           0 : static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   23640           0 :   return __pyx_MemviewEnum___repr__(self);
   23641             : }
   23642             : 
   23643             : static PyMethodDef __pyx_methods_Enum[] = {
   23644             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
   23645             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23646             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23647             :   {0, 0, 0, 0}
   23648             : };
   23649             : #if CYTHON_USE_TYPE_SPECS
   23650             : static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
   23651             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
   23652             :   {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
   23653             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
   23654             :   {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
   23655             :   {Py_tp_methods, (void *)__pyx_methods_Enum},
   23656             :   {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
   23657             :   {Py_tp_new, (void *)__pyx_tp_new_Enum},
   23658             :   {0, 0},
   23659             : };
   23660             : static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
   23661             :   "scipy.optimize._trlib._trlib.Enum",
   23662             :   sizeof(struct __pyx_MemviewEnum_obj),
   23663             :   0,
   23664             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   23665             :   __pyx_type___pyx_MemviewEnum_slots,
   23666             : };
   23667             : #else
   23668             : 
   23669             : static PyTypeObject __pyx_type___pyx_MemviewEnum = {
   23670             :   PyVarObject_HEAD_INIT(0, 0)
   23671             :   "scipy.optimize._trlib._trlib.""Enum", /*tp_name*/
   23672             :   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
   23673             :   0, /*tp_itemsize*/
   23674             :   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
   23675             :   #if PY_VERSION_HEX < 0x030800b4
   23676             :   0, /*tp_print*/
   23677             :   #endif
   23678             :   #if PY_VERSION_HEX >= 0x030800b4
   23679             :   0, /*tp_vectorcall_offset*/
   23680             :   #endif
   23681             :   0, /*tp_getattr*/
   23682             :   0, /*tp_setattr*/
   23683             :   #if PY_MAJOR_VERSION < 3
   23684             :   0, /*tp_compare*/
   23685             :   #endif
   23686             :   #if PY_MAJOR_VERSION >= 3
   23687             :   0, /*tp_as_async*/
   23688             :   #endif
   23689             :   __pyx_MemviewEnum___repr__, /*tp_repr*/
   23690             :   0, /*tp_as_number*/
   23691             :   0, /*tp_as_sequence*/
   23692             :   0, /*tp_as_mapping*/
   23693             :   0, /*tp_hash*/
   23694             :   0, /*tp_call*/
   23695             :   0, /*tp_str*/
   23696             :   0, /*tp_getattro*/
   23697             :   0, /*tp_setattro*/
   23698             :   0, /*tp_as_buffer*/
   23699             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   23700             :   0, /*tp_doc*/
   23701             :   __pyx_tp_traverse_Enum, /*tp_traverse*/
   23702             :   __pyx_tp_clear_Enum, /*tp_clear*/
   23703             :   0, /*tp_richcompare*/
   23704             :   0, /*tp_weaklistoffset*/
   23705             :   0, /*tp_iter*/
   23706             :   0, /*tp_iternext*/
   23707             :   __pyx_methods_Enum, /*tp_methods*/
   23708             :   0, /*tp_members*/
   23709             :   0, /*tp_getset*/
   23710             :   0, /*tp_base*/
   23711             :   0, /*tp_dict*/
   23712             :   0, /*tp_descr_get*/
   23713             :   0, /*tp_descr_set*/
   23714             :   #if !CYTHON_USE_TYPE_SPECS
   23715             :   0, /*tp_dictoffset*/
   23716             :   #endif
   23717             :   __pyx_MemviewEnum___init__, /*tp_init*/
   23718             :   0, /*tp_alloc*/
   23719             :   __pyx_tp_new_Enum, /*tp_new*/
   23720             :   0, /*tp_free*/
   23721             :   0, /*tp_is_gc*/
   23722             :   0, /*tp_bases*/
   23723             :   0, /*tp_mro*/
   23724             :   0, /*tp_cache*/
   23725             :   0, /*tp_subclasses*/
   23726             :   0, /*tp_weaklist*/
   23727             :   0, /*tp_del*/
   23728             :   0, /*tp_version_tag*/
   23729             :   #if PY_VERSION_HEX >= 0x030400a1
   23730             :   #if CYTHON_USE_TP_FINALIZE
   23731             :   0, /*tp_finalize*/
   23732             :   #else
   23733             :   NULL, /*tp_finalize*/
   23734             :   #endif
   23735             :   #endif
   23736             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   23737             :   0, /*tp_vectorcall*/
   23738             :   #endif
   23739             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   23740             :   0, /*tp_print*/
   23741             :   #endif
   23742             :   #if PY_VERSION_HEX >= 0x030C0000
   23743             :   0, /*tp_watched*/
   23744             :   #endif
   23745             :   #if PY_VERSION_HEX >= 0x030d00A4
   23746             :   0, /*tp_versions_used*/
   23747             :   #endif
   23748             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   23749             :   0, /*tp_pypy_flags*/
   23750             :   #endif
   23751             : };
   23752             : #endif
   23753             : static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
   23754             : 
   23755         772 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
   23756         772 :   struct __pyx_memoryview_obj *p;
   23757         772 :   PyObject *o;
   23758             :   #if CYTHON_COMPILING_IN_LIMITED_API
   23759             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   23760             :   o = alloc_func(t, 0);
   23761             :   #else
   23762         772 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   23763         772 :     o = (*t->tp_alloc)(t, 0);
   23764             :   } else {
   23765           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   23766             :   }
   23767         772 :   if (unlikely(!o)) return 0;
   23768             :   #endif
   23769         772 :   p = ((struct __pyx_memoryview_obj *)o);
   23770         772 :   p->__pyx_vtab = __pyx_vtabptr_memoryview;
   23771         772 :   p->obj = Py_None; Py_INCREF(Py_None);
   23772         772 :   p->_size = Py_None; Py_INCREF(Py_None);
   23773         772 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   23774         772 :   p->view.obj = NULL;
   23775         772 :   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
   23776             :   return o;
   23777           0 :   bad:
   23778           0 :   Py_DECREF(o); o = 0;
   23779             :   return NULL;
   23780             : }
   23781             : 
   23782         772 : static void __pyx_tp_dealloc_memoryview(PyObject *o) {
   23783         772 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   23784             :   #if CYTHON_USE_TP_FINALIZE
   23785         772 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   23786           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
   23787           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   23788             :     }
   23789             :   }
   23790             :   #endif
   23791         772 :   PyObject_GC_UnTrack(o);
   23792             :   {
   23793         772 :     PyObject *etype, *eval, *etb;
   23794         772 :     PyErr_Fetch(&etype, &eval, &etb);
   23795         772 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   23796         772 :     __pyx_memoryview___dealloc__(o);
   23797         772 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   23798         772 :     PyErr_Restore(etype, eval, etb);
   23799             :   }
   23800         772 :   Py_CLEAR(p->obj);
   23801         772 :   Py_CLEAR(p->_size);
   23802         772 :   Py_CLEAR(p->_array_interface);
   23803             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   23804         772 :   (*Py_TYPE(o)->tp_free)(o);
   23805             :   #else
   23806             :   {
   23807             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   23808             :     if (tp_free) tp_free(o);
   23809             :   }
   23810             :   #endif
   23811             : }
   23812             : 
   23813           0 : static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
   23814           0 :   int e;
   23815           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   23816           0 :   if (p->obj) {
   23817           0 :     e = (*v)(p->obj, a); if (e) return e;
   23818             :   }
   23819           0 :   if (p->_size) {
   23820           0 :     e = (*v)(p->_size, a); if (e) return e;
   23821             :   }
   23822           0 :   if (p->_array_interface) {
   23823           0 :     e = (*v)(p->_array_interface, a); if (e) return e;
   23824             :   }
   23825           0 :   if (p->view.obj) {
   23826           0 :     e = (*v)(p->view.obj, a); if (e) return e;
   23827             :   }
   23828             :   return 0;
   23829             : }
   23830             : 
   23831           0 : static int __pyx_tp_clear_memoryview(PyObject *o) {
   23832           0 :   PyObject* tmp;
   23833           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   23834           0 :   tmp = ((PyObject*)p->obj);
   23835           0 :   p->obj = Py_None; Py_INCREF(Py_None);
   23836           0 :   Py_XDECREF(tmp);
   23837           0 :   tmp = ((PyObject*)p->_size);
   23838           0 :   p->_size = Py_None; Py_INCREF(Py_None);
   23839           0 :   Py_XDECREF(tmp);
   23840           0 :   tmp = ((PyObject*)p->_array_interface);
   23841           0 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   23842           0 :   Py_XDECREF(tmp);
   23843           0 :   Py_CLEAR(p->view.obj);
   23844           0 :   return 0;
   23845             : }
   23846           0 : static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
   23847           0 :   PyObject *r;
   23848           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   23849           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   23850           0 :   Py_DECREF(x);
   23851             :   return r;
   23852             : }
   23853             : 
   23854           0 : static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
   23855           0 :   if (v) {
   23856           0 :     return __pyx_memoryview___setitem__(o, i, v);
   23857             :   }
   23858             :   else {
   23859           0 :     __Pyx_TypeName o_type_name;
   23860           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   23861           0 :     PyErr_Format(PyExc_NotImplementedError,
   23862             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   23863           0 :     __Pyx_DECREF_TypeName(o_type_name);
   23864           0 :     return -1;
   23865             :   }
   23866             : }
   23867             : 
   23868           0 : static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
   23869           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
   23870             : }
   23871             : 
   23872           0 : static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
   23873           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
   23874             : }
   23875             : 
   23876           0 : static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
   23877           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
   23878             : }
   23879             : 
   23880           0 : static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
   23881           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
   23882             : }
   23883             : 
   23884           0 : static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
   23885           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
   23886             : }
   23887             : 
   23888           0 : static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
   23889           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
   23890             : }
   23891             : 
   23892           0 : static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
   23893           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
   23894             : }
   23895             : 
   23896           0 : static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
   23897           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
   23898             : }
   23899             : 
   23900           0 : static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
   23901           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
   23902             : }
   23903             : 
   23904           0 : static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   23905           0 :   return __pyx_memoryview___repr__(self);
   23906             : }
   23907             : 
   23908             : static PyMethodDef __pyx_methods_memoryview[] = {
   23909             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
   23910             :   {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23911             :   {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23912             :   {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23913             :   {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23914             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23915             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   23916             :   {0, 0, 0, 0}
   23917             : };
   23918             : 
   23919             : static struct PyGetSetDef __pyx_getsets_memoryview[] = {
   23920             :   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
   23921             :   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
   23922             :   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
   23923             :   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
   23924             :   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
   23925             :   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
   23926             :   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
   23927             :   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
   23928             :   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
   23929             :   {0, 0, 0, 0, 0}
   23930             : };
   23931             : #if CYTHON_USE_TYPE_SPECS
   23932             : #if !CYTHON_COMPILING_IN_LIMITED_API
   23933             : 
   23934             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   23935             :   #if PY_MAJOR_VERSION < 3
   23936             :   0, /*bf_getreadbuffer*/
   23937             :   #endif
   23938             :   #if PY_MAJOR_VERSION < 3
   23939             :   0, /*bf_getwritebuffer*/
   23940             :   #endif
   23941             :   #if PY_MAJOR_VERSION < 3
   23942             :   0, /*bf_getsegcount*/
   23943             :   #endif
   23944             :   #if PY_MAJOR_VERSION < 3
   23945             :   0, /*bf_getcharbuffer*/
   23946             :   #endif
   23947             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   23948             :   0, /*bf_releasebuffer*/
   23949             : };
   23950             : #endif
   23951             : static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
   23952             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
   23953             :   {Py_tp_repr, (void *)__pyx_memoryview___repr__},
   23954             :   {Py_sq_length, (void *)__pyx_memoryview___len__},
   23955             :   {Py_sq_item, (void *)__pyx_sq_item_memoryview},
   23956             :   {Py_mp_length, (void *)__pyx_memoryview___len__},
   23957             :   {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
   23958             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
   23959             :   {Py_tp_str, (void *)__pyx_memoryview___str__},
   23960             :   #if defined(Py_bf_getbuffer)
   23961             :   {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
   23962             :   #endif
   23963             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
   23964             :   {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
   23965             :   {Py_tp_methods, (void *)__pyx_methods_memoryview},
   23966             :   {Py_tp_getset, (void *)__pyx_getsets_memoryview},
   23967             :   {Py_tp_new, (void *)__pyx_tp_new_memoryview},
   23968             :   {0, 0},
   23969             : };
   23970             : static PyType_Spec __pyx_type___pyx_memoryview_spec = {
   23971             :   "scipy.optimize._trlib._trlib.memoryview",
   23972             :   sizeof(struct __pyx_memoryview_obj),
   23973             :   0,
   23974             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   23975             :   __pyx_type___pyx_memoryview_slots,
   23976             : };
   23977             : #else
   23978             : 
   23979             : static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
   23980             :   __pyx_memoryview___len__, /*sq_length*/
   23981             :   0, /*sq_concat*/
   23982             :   0, /*sq_repeat*/
   23983             :   __pyx_sq_item_memoryview, /*sq_item*/
   23984             :   0, /*sq_slice*/
   23985             :   0, /*sq_ass_item*/
   23986             :   0, /*sq_ass_slice*/
   23987             :   0, /*sq_contains*/
   23988             :   0, /*sq_inplace_concat*/
   23989             :   0, /*sq_inplace_repeat*/
   23990             : };
   23991             : 
   23992             : static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
   23993             :   __pyx_memoryview___len__, /*mp_length*/
   23994             :   __pyx_memoryview___getitem__, /*mp_subscript*/
   23995             :   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
   23996             : };
   23997             : 
   23998             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   23999             :   #if PY_MAJOR_VERSION < 3
   24000             :   0, /*bf_getreadbuffer*/
   24001             :   #endif
   24002             :   #if PY_MAJOR_VERSION < 3
   24003             :   0, /*bf_getwritebuffer*/
   24004             :   #endif
   24005             :   #if PY_MAJOR_VERSION < 3
   24006             :   0, /*bf_getsegcount*/
   24007             :   #endif
   24008             :   #if PY_MAJOR_VERSION < 3
   24009             :   0, /*bf_getcharbuffer*/
   24010             :   #endif
   24011             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   24012             :   0, /*bf_releasebuffer*/
   24013             : };
   24014             : 
   24015             : static PyTypeObject __pyx_type___pyx_memoryview = {
   24016             :   PyVarObject_HEAD_INIT(0, 0)
   24017             :   "scipy.optimize._trlib._trlib.""memoryview", /*tp_name*/
   24018             :   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
   24019             :   0, /*tp_itemsize*/
   24020             :   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
   24021             :   #if PY_VERSION_HEX < 0x030800b4
   24022             :   0, /*tp_print*/
   24023             :   #endif
   24024             :   #if PY_VERSION_HEX >= 0x030800b4
   24025             :   0, /*tp_vectorcall_offset*/
   24026             :   #endif
   24027             :   0, /*tp_getattr*/
   24028             :   0, /*tp_setattr*/
   24029             :   #if PY_MAJOR_VERSION < 3
   24030             :   0, /*tp_compare*/
   24031             :   #endif
   24032             :   #if PY_MAJOR_VERSION >= 3
   24033             :   0, /*tp_as_async*/
   24034             :   #endif
   24035             :   __pyx_memoryview___repr__, /*tp_repr*/
   24036             :   0, /*tp_as_number*/
   24037             :   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
   24038             :   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
   24039             :   0, /*tp_hash*/
   24040             :   0, /*tp_call*/
   24041             :   __pyx_memoryview___str__, /*tp_str*/
   24042             :   0, /*tp_getattro*/
   24043             :   0, /*tp_setattro*/
   24044             :   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
   24045             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   24046             :   0, /*tp_doc*/
   24047             :   __pyx_tp_traverse_memoryview, /*tp_traverse*/
   24048             :   __pyx_tp_clear_memoryview, /*tp_clear*/
   24049             :   0, /*tp_richcompare*/
   24050             :   0, /*tp_weaklistoffset*/
   24051             :   0, /*tp_iter*/
   24052             :   0, /*tp_iternext*/
   24053             :   __pyx_methods_memoryview, /*tp_methods*/
   24054             :   0, /*tp_members*/
   24055             :   __pyx_getsets_memoryview, /*tp_getset*/
   24056             :   0, /*tp_base*/
   24057             :   0, /*tp_dict*/
   24058             :   0, /*tp_descr_get*/
   24059             :   0, /*tp_descr_set*/
   24060             :   #if !CYTHON_USE_TYPE_SPECS
   24061             :   0, /*tp_dictoffset*/
   24062             :   #endif
   24063             :   0, /*tp_init*/
   24064             :   0, /*tp_alloc*/
   24065             :   __pyx_tp_new_memoryview, /*tp_new*/
   24066             :   0, /*tp_free*/
   24067             :   0, /*tp_is_gc*/
   24068             :   0, /*tp_bases*/
   24069             :   0, /*tp_mro*/
   24070             :   0, /*tp_cache*/
   24071             :   0, /*tp_subclasses*/
   24072             :   0, /*tp_weaklist*/
   24073             :   0, /*tp_del*/
   24074             :   0, /*tp_version_tag*/
   24075             :   #if PY_VERSION_HEX >= 0x030400a1
   24076             :   #if CYTHON_USE_TP_FINALIZE
   24077             :   0, /*tp_finalize*/
   24078             :   #else
   24079             :   NULL, /*tp_finalize*/
   24080             :   #endif
   24081             :   #endif
   24082             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   24083             :   0, /*tp_vectorcall*/
   24084             :   #endif
   24085             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   24086             :   0, /*tp_print*/
   24087             :   #endif
   24088             :   #if PY_VERSION_HEX >= 0x030C0000
   24089             :   0, /*tp_watched*/
   24090             :   #endif
   24091             :   #if PY_VERSION_HEX >= 0x030d00A4
   24092             :   0, /*tp_versions_used*/
   24093             :   #endif
   24094             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   24095             :   0, /*tp_pypy_flags*/
   24096             :   #endif
   24097             : };
   24098             : #endif
   24099             : static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
   24100             : 
   24101           0 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
   24102           0 :   struct __pyx_memoryviewslice_obj *p;
   24103           0 :   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
   24104           0 :   if (unlikely(!o)) return 0;
   24105           0 :   p = ((struct __pyx_memoryviewslice_obj *)o);
   24106           0 :   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
   24107           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   24108           0 :   p->from_slice.memview = NULL;
   24109           0 :   return o;
   24110             : }
   24111             : 
   24112           0 : static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
   24113           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24114             :   #if CYTHON_USE_TP_FINALIZE
   24115           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   24116           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
   24117           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   24118             :     }
   24119             :   }
   24120             :   #endif
   24121           0 :   PyObject_GC_UnTrack(o);
   24122             :   {
   24123           0 :     PyObject *etype, *eval, *etb;
   24124           0 :     PyErr_Fetch(&etype, &eval, &etb);
   24125           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   24126           0 :     __pyx_memoryviewslice___dealloc__(o);
   24127           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   24128           0 :     PyErr_Restore(etype, eval, etb);
   24129             :   }
   24130           0 :   Py_CLEAR(p->from_object);
   24131           0 :   PyObject_GC_Track(o);
   24132           0 :   __pyx_tp_dealloc_memoryview(o);
   24133             : }
   24134             : 
   24135           0 : static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
   24136           0 :   int e;
   24137           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24138           0 :   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
   24139           0 :   if (p->from_object) {
   24140           0 :     e = (*v)(p->from_object, a); if (e) return e;
   24141             :   }
   24142             :   return 0;
   24143             : }
   24144             : 
   24145           0 : static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
   24146           0 :   PyObject* tmp;
   24147           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24148           0 :   __pyx_tp_clear_memoryview(o);
   24149           0 :   tmp = ((PyObject*)p->from_object);
   24150           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   24151           0 :   Py_XDECREF(tmp);
   24152           0 :   __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
   24153           0 :   return 0;
   24154             : }
   24155             : 
   24156             : static PyMethodDef __pyx_methods__memoryviewslice[] = {
   24157             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24158             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24159             :   {0, 0, 0, 0}
   24160             : };
   24161             : #if CYTHON_USE_TYPE_SPECS
   24162             : static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
   24163             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
   24164             :   {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
   24165             :   {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
   24166             :   {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
   24167             :   {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
   24168             :   {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
   24169             :   {0, 0},
   24170             : };
   24171             : static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
   24172             :   "scipy.optimize._trlib._trlib._memoryviewslice",
   24173             :   sizeof(struct __pyx_memoryviewslice_obj),
   24174             :   0,
   24175             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
   24176             :   __pyx_type___pyx_memoryviewslice_slots,
   24177             : };
   24178             : #else
   24179             : 
   24180             : static PyTypeObject __pyx_type___pyx_memoryviewslice = {
   24181             :   PyVarObject_HEAD_INIT(0, 0)
   24182             :   "scipy.optimize._trlib._trlib.""_memoryviewslice", /*tp_name*/
   24183             :   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
   24184             :   0, /*tp_itemsize*/
   24185             :   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
   24186             :   #if PY_VERSION_HEX < 0x030800b4
   24187             :   0, /*tp_print*/
   24188             :   #endif
   24189             :   #if PY_VERSION_HEX >= 0x030800b4
   24190             :   0, /*tp_vectorcall_offset*/
   24191             :   #endif
   24192             :   0, /*tp_getattr*/
   24193             :   0, /*tp_setattr*/
   24194             :   #if PY_MAJOR_VERSION < 3
   24195             :   0, /*tp_compare*/
   24196             :   #endif
   24197             :   #if PY_MAJOR_VERSION >= 3
   24198             :   0, /*tp_as_async*/
   24199             :   #endif
   24200             :   #if CYTHON_COMPILING_IN_PYPY || 0
   24201             :   __pyx_memoryview___repr__, /*tp_repr*/
   24202             :   #else
   24203             :   0, /*tp_repr*/
   24204             :   #endif
   24205             :   0, /*tp_as_number*/
   24206             :   0, /*tp_as_sequence*/
   24207             :   0, /*tp_as_mapping*/
   24208             :   0, /*tp_hash*/
   24209             :   0, /*tp_call*/
   24210             :   #if CYTHON_COMPILING_IN_PYPY || 0
   24211             :   __pyx_memoryview___str__, /*tp_str*/
   24212             :   #else
   24213             :   0, /*tp_str*/
   24214             :   #endif
   24215             :   0, /*tp_getattro*/
   24216             :   0, /*tp_setattro*/
   24217             :   0, /*tp_as_buffer*/
   24218             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   24219             :   PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
   24220             :   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
   24221             :   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
   24222             :   0, /*tp_richcompare*/
   24223             :   0, /*tp_weaklistoffset*/
   24224             :   0, /*tp_iter*/
   24225             :   0, /*tp_iternext*/
   24226             :   __pyx_methods__memoryviewslice, /*tp_methods*/
   24227             :   0, /*tp_members*/
   24228             :   0, /*tp_getset*/
   24229             :   0, /*tp_base*/
   24230             :   0, /*tp_dict*/
   24231             :   0, /*tp_descr_get*/
   24232             :   0, /*tp_descr_set*/
   24233             :   #if !CYTHON_USE_TYPE_SPECS
   24234             :   0, /*tp_dictoffset*/
   24235             :   #endif
   24236             :   0, /*tp_init*/
   24237             :   0, /*tp_alloc*/
   24238             :   __pyx_tp_new__memoryviewslice, /*tp_new*/
   24239             :   0, /*tp_free*/
   24240             :   0, /*tp_is_gc*/
   24241             :   0, /*tp_bases*/
   24242             :   0, /*tp_mro*/
   24243             :   0, /*tp_cache*/
   24244             :   0, /*tp_subclasses*/
   24245             :   0, /*tp_weaklist*/
   24246             :   0, /*tp_del*/
   24247             :   0, /*tp_version_tag*/
   24248             :   #if PY_VERSION_HEX >= 0x030400a1
   24249             :   #if CYTHON_USE_TP_FINALIZE
   24250             :   0, /*tp_finalize*/
   24251             :   #else
   24252             :   NULL, /*tp_finalize*/
   24253             :   #endif
   24254             :   #endif
   24255             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   24256             :   0, /*tp_vectorcall*/
   24257             :   #endif
   24258             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   24259             :   0, /*tp_print*/
   24260             :   #endif
   24261             :   #if PY_VERSION_HEX >= 0x030C0000
   24262             :   0, /*tp_watched*/
   24263             :   #endif
   24264             :   #if PY_VERSION_HEX >= 0x030d00A4
   24265             :   0, /*tp_versions_used*/
   24266             :   #endif
   24267             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   24268             :   0, /*tp_pypy_flags*/
   24269             :   #endif
   24270             : };
   24271             : #endif
   24272             : 
   24273             : static PyMethodDef __pyx_methods[] = {
   24274             :   {0, 0, 0, 0}
   24275             : };
   24276             : #ifndef CYTHON_SMALL_CODE
   24277             : #if defined(__clang__)
   24278             :     #define CYTHON_SMALL_CODE
   24279             : #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
   24280             :     #define CYTHON_SMALL_CODE __attribute__((cold))
   24281             : #else
   24282             :     #define CYTHON_SMALL_CODE
   24283             : #endif
   24284             : #endif
   24285             : /* #### Code section: pystring_table ### */
   24286             : 
   24287           3 : static int __Pyx_CreateStringTabAndInitStrings(void) {
   24288           3 :   __Pyx_StringTabEntry __pyx_string_tab[] = {
   24289           3 :     {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
   24290           3 :     {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
   24291           3 :     {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
   24292           3 :     {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
   24293           3 :     {&__pyx_n_s_BaseQuadraticSubproblem, __pyx_k_BaseQuadraticSubproblem, sizeof(__pyx_k_BaseQuadraticSubproblem), 0, 0, 1, 1},
   24294           3 :     {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
   24295           3 :     {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
   24296           3 :     {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
   24297           3 :     {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
   24298           3 :     {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
   24299           3 :     {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
   24300           3 :     {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
   24301           3 :     {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
   24302           3 :     {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
   24303           3 :     {&__pyx_n_s_Hp, __pyx_k_Hp, sizeof(__pyx_k_Hp), 0, 0, 1, 1},
   24304           3 :     {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
   24305           3 :     {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
   24306           3 :     {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
   24307           3 :     {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
   24308           3 :     {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
   24309           3 :     {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
   24310           3 :     {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
   24311           3 :     {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
   24312           3 :     {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
   24313           3 :     {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
   24314           3 :     {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
   24315           3 :     {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
   24316           3 :     {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
   24317           3 :     {&__pyx_n_s_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 1, 1},
   24318           3 :     {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
   24319           3 :     {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
   24320           3 :     {&__pyx_n_s_TRLIBQuadraticSubproblem, __pyx_k_TRLIBQuadraticSubproblem, sizeof(__pyx_k_TRLIBQuadraticSubproblem), 0, 0, 1, 1},
   24321           3 :     {&__pyx_n_s_TRLIBQuadraticSubproblem___init, __pyx_k_TRLIBQuadraticSubproblem___init, sizeof(__pyx_k_TRLIBQuadraticSubproblem___init), 0, 0, 1, 1},
   24322           3 :     {&__pyx_n_s_TRLIBQuadraticSubproblem_solve, __pyx_k_TRLIBQuadraticSubproblem_solve, sizeof(__pyx_k_TRLIBQuadraticSubproblem_solve), 0, 0, 1, 1},
   24323           3 :     {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
   24324           3 :     {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
   24325           3 :     {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
   24326           3 :     {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
   24327           3 :     {&__pyx_kp_b__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 0, 0},
   24328           3 :     {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
   24329           3 :     {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
   24330           3 :     {&__pyx_n_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 1},
   24331           3 :     {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
   24332           3 :     {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
   24333           3 :     {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
   24334           3 :     {&__pyx_n_s_action, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1},
   24335           3 :     {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
   24336           3 :     {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
   24337           3 :     {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
   24338           3 :     {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
   24339           3 :     {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
   24340           3 :     {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
   24341           3 :     {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
   24342           3 :     {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
   24343           3 :     {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
   24344           3 :     {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
   24345           3 :     {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
   24346           3 :     {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
   24347           3 :     {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
   24348           3 :     {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
   24349           3 :     {&__pyx_n_s_convexify, __pyx_k_convexify, sizeof(__pyx_k_convexify), 0, 0, 1, 1},
   24350           3 :     {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
   24351           3 :     {&__pyx_n_s_ctl_invariant, __pyx_k_ctl_invariant, sizeof(__pyx_k_ctl_invariant), 0, 0, 1, 1},
   24352           3 :     {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
   24353           3 :     {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
   24354           3 :     {&__pyx_n_s_disp, __pyx_k_disp, sizeof(__pyx_k_disp), 0, 0, 1, 1},
   24355           3 :     {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
   24356           3 :     {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
   24357           3 :     {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
   24358           3 :     {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
   24359           3 :     {&__pyx_n_s_earlyterm, __pyx_k_earlyterm, sizeof(__pyx_k_earlyterm), 0, 0, 1, 1},
   24360           3 :     {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
   24361           3 :     {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
   24362           3 :     {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
   24363           3 :     {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
   24364           3 :     {&__pyx_n_s_equality, __pyx_k_equality, sizeof(__pyx_k_equality), 0, 0, 1, 1},
   24365           3 :     {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
   24366           3 :     {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
   24367           3 :     {&__pyx_n_s_flt1, __pyx_k_flt1, sizeof(__pyx_k_flt1), 0, 0, 1, 1},
   24368           3 :     {&__pyx_n_s_flt2, __pyx_k_flt2, sizeof(__pyx_k_flt2), 0, 0, 1, 1},
   24369           3 :     {&__pyx_n_s_flt3, __pyx_k_flt3, sizeof(__pyx_k_flt3), 0, 0, 1, 1},
   24370           3 :     {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
   24371           3 :     {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
   24372           3 :     {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
   24373           3 :     {&__pyx_n_s_fun, __pyx_k_fun, sizeof(__pyx_k_fun), 0, 0, 1, 1},
   24374           3 :     {&__pyx_n_s_fwork, __pyx_k_fwork, sizeof(__pyx_k_fwork), 0, 0, 1, 1},
   24375           3 :     {&__pyx_n_s_fwork_ptr, __pyx_k_fwork_ptr, sizeof(__pyx_k_fwork_ptr), 0, 0, 1, 1},
   24376           3 :     {&__pyx_n_s_fwork_size, __pyx_k_fwork_size, sizeof(__pyx_k_fwork_size), 0, 0, 1, 1},
   24377           3 :     {&__pyx_n_s_fwork_view, __pyx_k_fwork_view, sizeof(__pyx_k_fwork_view), 0, 0, 1, 1},
   24378           3 :     {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
   24379           3 :     {&__pyx_n_s_g_dot_g, __pyx_k_g_dot_g, sizeof(__pyx_k_g_dot_g), 0, 0, 1, 1},
   24380           3 :     {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
   24381           3 :     {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
   24382           3 :     {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
   24383           3 :     {&__pyx_n_s_gm, __pyx_k_gm, sizeof(__pyx_k_gm), 0, 0, 1, 1},
   24384           3 :     {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
   24385           3 :     {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
   24386           3 :     {&__pyx_n_s_h_pointer, __pyx_k_h_pointer, sizeof(__pyx_k_h_pointer), 0, 0, 1, 1},
   24387           3 :     {&__pyx_n_s_hess, __pyx_k_hess, sizeof(__pyx_k_hess), 0, 0, 1, 1},
   24388           3 :     {&__pyx_n_s_hessp, __pyx_k_hessp, sizeof(__pyx_k_hessp), 0, 0, 1, 1},
   24389           3 :     {&__pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_k_home_czgdp18079_Quansight_scipy, sizeof(__pyx_k_home_czgdp18079_Quansight_scipy), 0, 0, 1, 0},
   24390           3 :     {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
   24391           3 :     {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
   24392           3 :     {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
   24393           3 :     {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
   24394           3 :     {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
   24395           3 :     {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
   24396           3 :     {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
   24397           3 :     {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
   24398           3 :     {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
   24399           3 :     {&__pyx_n_s_it, __pyx_k_it, sizeof(__pyx_k_it), 0, 0, 1, 1},
   24400           3 :     {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
   24401           3 :     {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
   24402           3 :     {&__pyx_n_s_itmax, __pyx_k_itmax, sizeof(__pyx_k_itmax), 0, 0, 1, 1},
   24403           3 :     {&__pyx_n_s_itmax_lanczos, __pyx_k_itmax_lanczos, sizeof(__pyx_k_itmax_lanczos), 0, 0, 1, 1},
   24404           3 :     {&__pyx_n_s_ityp, __pyx_k_ityp, sizeof(__pyx_k_ityp), 0, 0, 1, 1},
   24405           3 :     {&__pyx_n_s_iwork, __pyx_k_iwork, sizeof(__pyx_k_iwork), 0, 0, 1, 1},
   24406           3 :     {&__pyx_n_s_iwork_ptr, __pyx_k_iwork_ptr, sizeof(__pyx_k_iwork_ptr), 0, 0, 1, 1},
   24407           3 :     {&__pyx_n_s_iwork_size, __pyx_k_iwork_size, sizeof(__pyx_k_iwork_size), 0, 0, 1, 1},
   24408           3 :     {&__pyx_n_s_iwork_view, __pyx_k_iwork_view, sizeof(__pyx_k_iwork_view), 0, 0, 1, 1},
   24409           3 :     {&__pyx_n_s_jac, __pyx_k_jac, sizeof(__pyx_k_jac), 0, 0, 1, 1},
   24410           3 :     {&__pyx_n_s_lam, __pyx_k_lam, sizeof(__pyx_k_lam), 0, 0, 1, 1},
   24411           3 :     {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 1, 0, 1},
   24412           3 :     {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
   24413           3 :     {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
   24414           3 :     {&__pyx_n_s_messages, __pyx_k_messages, sizeof(__pyx_k_messages), 0, 0, 1, 1},
   24415           3 :     {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
   24416           3 :     {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
   24417           3 :     {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
   24418           3 :     {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
   24419           3 :     {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
   24420           3 :     {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
   24421           3 :     {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
   24422           3 :     {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
   24423           3 :     {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
   24424           3 :     {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
   24425           3 :     {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
   24426           3 :     {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
   24427           3 :     {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0},
   24428           3 :     {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0},
   24429           3 :     {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
   24430           3 :     {&__pyx_n_s_obj_lb, __pyx_k_obj_lb, sizeof(__pyx_k_obj_lb), 0, 0, 1, 1},
   24431           3 :     {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
   24432           3 :     {&__pyx_n_s_p_dot_Hp, __pyx_k_p_dot_Hp, sizeof(__pyx_k_p_dot_Hp), 0, 0, 1, 1},
   24433           3 :     {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
   24434           3 :     {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
   24435           3 :     {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
   24436           3 :     {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
   24437           3 :     {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
   24438           3 :     {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
   24439           3 :     {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
   24440           3 :     {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
   24441           3 :     {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
   24442           3 :     {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
   24443           3 :     {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
   24444           3 :     {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
   24445           3 :     {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
   24446           3 :     {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
   24447           3 :     {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
   24448           3 :     {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
   24449           3 :     {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
   24450           3 :     {&__pyx_n_s_refine, __pyx_k_refine, sizeof(__pyx_k_refine), 0, 0, 1, 1},
   24451           3 :     {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
   24452           3 :     {&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
   24453           3 :     {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
   24454           3 :     {&__pyx_n_s_scipy_optimize__trlib__trlib, __pyx_k_scipy_optimize__trlib__trlib, sizeof(__pyx_k_scipy_optimize__trlib__trlib), 0, 0, 1, 1},
   24455           3 :     {&__pyx_n_s_scipy_optimize__trustregion, __pyx_k_scipy_optimize__trustregion, sizeof(__pyx_k_scipy_optimize__trustregion), 0, 0, 1, 1},
   24456           3 :     {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
   24457           3 :     {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
   24458           3 :     {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
   24459           3 :     {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
   24460           3 :     {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
   24461           3 :     {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
   24462           3 :     {&__pyx_n_s_solve, __pyx_k_solve, sizeof(__pyx_k_solve), 0, 0, 1, 1},
   24463           3 :     {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
   24464           3 :     {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
   24465           3 :     {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
   24466           3 :     {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
   24467           3 :     {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
   24468           3 :     {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
   24469           3 :     {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
   24470           3 :     {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
   24471           3 :     {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
   24472           3 :     {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
   24473           3 :     {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
   24474           3 :     {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
   24475           3 :     {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
   24476           3 :     {&__pyx_n_s_timing, __pyx_k_timing, sizeof(__pyx_k_timing), 0, 0, 1, 1},
   24477           3 :     {&__pyx_n_s_timing_ptr, __pyx_k_timing_ptr, sizeof(__pyx_k_timing_ptr), 0, 0, 1, 1},
   24478           3 :     {&__pyx_n_s_timing_view, __pyx_k_timing_view, sizeof(__pyx_k_timing_view), 0, 0, 1, 1},
   24479           3 :     {&__pyx_n_s_tol_a_b, __pyx_k_tol_a_b, sizeof(__pyx_k_tol_a_b), 0, 0, 1, 1},
   24480           3 :     {&__pyx_n_s_tol_a_i, __pyx_k_tol_a_i, sizeof(__pyx_k_tol_a_i), 0, 0, 1, 1},
   24481           3 :     {&__pyx_n_s_tol_r_b, __pyx_k_tol_r_b, sizeof(__pyx_k_tol_r_b), 0, 0, 1, 1},
   24482           3 :     {&__pyx_n_s_tol_r_i, __pyx_k_tol_r_i, sizeof(__pyx_k_tol_r_i), 0, 0, 1, 1},
   24483           3 :     {&__pyx_n_s_tol_rel_b, __pyx_k_tol_rel_b, sizeof(__pyx_k_tol_rel_b), 0, 0, 1, 1},
   24484           3 :     {&__pyx_n_s_tol_rel_i, __pyx_k_tol_rel_i, sizeof(__pyx_k_tol_rel_i), 0, 0, 1, 1},
   24485           3 :     {&__pyx_n_s_trust_radius, __pyx_k_trust_radius, sizeof(__pyx_k_trust_radius), 0, 0, 1, 1},
   24486           3 :     {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
   24487           3 :     {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
   24488           3 :     {&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1},
   24489           3 :     {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
   24490           3 :     {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
   24491           3 :     {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
   24492           3 :     {&__pyx_n_s_v_dot_g, __pyx_k_v_dot_g, sizeof(__pyx_k_v_dot_g), 0, 0, 1, 1},
   24493           3 :     {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
   24494           3 :     {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
   24495           3 :     {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
   24496           3 :     {&__pyx_n_s_zero, __pyx_k_zero, sizeof(__pyx_k_zero), 0, 0, 1, 1},
   24497           3 :     {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
   24498             :     {0, 0, 0, 0, 0, 0, 0}
   24499             :   };
   24500           3 :   return __Pyx_InitStrings(__pyx_string_tab);
   24501             : }
   24502             : /* #### Code section: cached_builtins ### */
   24503           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
   24504           3 :   __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 14, __pyx_L1_error)
   24505           3 :   __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 102, __pyx_L1_error)
   24506           3 :   __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
   24507           3 :   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 141, __pyx_L1_error)
   24508           3 :   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error)
   24509           3 :   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error)
   24510           3 :   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
   24511           3 :   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 261, __pyx_L1_error)
   24512           3 :   __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
   24513           3 :   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
   24514           3 :   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
   24515           3 :   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
   24516           3 :   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error)
   24517             :   return 0;
   24518             :   __pyx_L1_error:;
   24519             :   return -1;
   24520             : }
   24521             : /* #### Code section: cached_constants ### */
   24522             : 
   24523           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
   24524             :   __Pyx_RefNannyDeclarations
   24525           3 :   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
   24526             : 
   24527             :   /* "View.MemoryView":582
   24528             :  *     def suboffsets(self):
   24529             :  *         if self.view.suboffsets == NULL:
   24530             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   24531             :  * 
   24532             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   24533             :  */
   24534           3 :   __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error)
   24535           3 :   __Pyx_GOTREF(__pyx_tuple__4);
   24536           3 :   __Pyx_INCREF(__pyx_int_neg_1);
   24537           3 :   __Pyx_GIVEREF(__pyx_int_neg_1);
   24538           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
   24539           3 :   __Pyx_GIVEREF(__pyx_tuple__4);
   24540             : 
   24541             :   /* "View.MemoryView":679
   24542             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   24543             :  * 
   24544             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   24545             :  *     have_slices = False
   24546             :  *     seen_ellipsis = False
   24547             :  */
   24548           3 :   __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error)
   24549           3 :   __Pyx_GOTREF(__pyx_slice__5);
   24550           3 :   __Pyx_GIVEREF(__pyx_slice__5);
   24551             : 
   24552             :   /* "(tree fragment)":4
   24553             :  *     cdef object __pyx_PickleError
   24554             :  *     cdef object __pyx_result
   24555             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   24556             :  *         from pickle import PickleError as __pyx_PickleError
   24557             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   24558             :  */
   24559           3 :   __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
   24560           3 :   __Pyx_GOTREF(__pyx_tuple__8);
   24561           3 :   __Pyx_GIVEREF(__pyx_tuple__8);
   24562             : 
   24563             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   24564             :  *         __pyx_import_array()
   24565             :  *     except Exception:
   24566             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   24567             :  * 
   24568             :  * cdef inline int import_umath() except -1:
   24569             :  */
   24570           3 :   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error)
   24571           3 :   __Pyx_GOTREF(__pyx_tuple__9);
   24572           3 :   __Pyx_GIVEREF(__pyx_tuple__9);
   24573             : 
   24574             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   24575             :  *         _import_umath()
   24576             :  *     except Exception:
   24577             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   24578             :  * 
   24579             :  * cdef inline int import_ufunc() except -1:
   24580             :  */
   24581           3 :   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error)
   24582           3 :   __Pyx_GOTREF(__pyx_tuple__10);
   24583           3 :   __Pyx_GIVEREF(__pyx_tuple__10);
   24584             : 
   24585             :   /* "scipy/optimize/_trlib/_trlib.pyx":30
   24586             :  *             fwork_ptr = &fwork_view[0]
   24587             :  *         ctrlib.trlib_krylov_prepare_memory(itmax, fwork_ptr)
   24588             :  *         self.iwork = np.zeros([iwork_size], dtype=np.dtype("long"))             # <<<<<<<<<<<<<<
   24589             :  *         self.s  = np.empty(self.jac.shape)
   24590             :  *         self.g  = np.empty(self.jac.shape)
   24591             :  */
   24592           3 :   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_u_long); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 30, __pyx_L1_error)
   24593           3 :   __Pyx_GOTREF(__pyx_tuple__11);
   24594           3 :   __Pyx_GIVEREF(__pyx_tuple__11);
   24595             : 
   24596             :   /* "scipy/optimize/_trlib/_trlib.pyx":115
   24597             :  *                     self.Hp[:] = self.hessp(self.p)
   24598             :  *                     p_dot_Hp = np.dot(self.p, self.Hp)
   24599             :  *                     self.Q[0,:] = self.v/np.sqrt(v_dot_g)             # <<<<<<<<<<<<<<
   24600             :  *                 if action == ctrlib._TRLIB_CLA_RETRANSF:
   24601             :  *                     self.s[:] = np.dot(self.fwork[self.h_pointer:self.h_pointer+it+1],
   24602             :  */
   24603           3 :   __pyx_tuple__13 = PyTuple_Pack(2, __pyx_int_0, __pyx_slice__5); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 115, __pyx_L1_error)
   24604           3 :   __Pyx_GOTREF(__pyx_tuple__13);
   24605           3 :   __Pyx_GIVEREF(__pyx_tuple__13);
   24606             : 
   24607             :   /* "View.MemoryView":100
   24608             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   24609             :  * try:
   24610             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   24611             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   24612             :  *     else:
   24613             :  */
   24614           3 :   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 100, __pyx_L1_error)
   24615           3 :   __Pyx_GOTREF(__pyx_tuple__14);
   24616           3 :   __Pyx_GIVEREF(__pyx_tuple__14);
   24617           3 :   __pyx_tuple__15 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 100, __pyx_L1_error)
   24618           3 :   __Pyx_GOTREF(__pyx_tuple__15);
   24619           3 :   __Pyx_GIVEREF(__pyx_tuple__15);
   24620             : 
   24621             :   /* "View.MemoryView":101
   24622             :  * try:
   24623             :  *     if __import__("sys").version_info >= (3, 3):
   24624             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   24625             :  *     else:
   24626             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   24627             :  */
   24628           3 :   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 101, __pyx_L1_error)
   24629           3 :   __Pyx_GOTREF(__pyx_tuple__16);
   24630           3 :   __Pyx_GIVEREF(__pyx_tuple__16);
   24631             : 
   24632             :   /* "View.MemoryView":103
   24633             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   24634             :  *     else:
   24635             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   24636             :  * except:
   24637             :  * 
   24638             :  */
   24639           3 :   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 103, __pyx_L1_error)
   24640           3 :   __Pyx_GOTREF(__pyx_tuple__17);
   24641           3 :   __Pyx_GIVEREF(__pyx_tuple__17);
   24642             : 
   24643             :   /* "View.MemoryView":309
   24644             :  *         return self.name
   24645             :  * 
   24646             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   24647             :  * cdef strided = Enum("<strided and direct>") # default
   24648             :  * cdef indirect = Enum("<strided and indirect>")
   24649             :  */
   24650           3 :   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 309, __pyx_L1_error)
   24651           3 :   __Pyx_GOTREF(__pyx_tuple__18);
   24652           3 :   __Pyx_GIVEREF(__pyx_tuple__18);
   24653             : 
   24654             :   /* "View.MemoryView":310
   24655             :  * 
   24656             :  * cdef generic = Enum("<strided and direct or indirect>")
   24657             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   24658             :  * cdef indirect = Enum("<strided and indirect>")
   24659             :  * 
   24660             :  */
   24661           3 :   __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 310, __pyx_L1_error)
   24662           3 :   __Pyx_GOTREF(__pyx_tuple__19);
   24663           3 :   __Pyx_GIVEREF(__pyx_tuple__19);
   24664             : 
   24665             :   /* "View.MemoryView":311
   24666             :  * cdef generic = Enum("<strided and direct or indirect>")
   24667             :  * cdef strided = Enum("<strided and direct>") # default
   24668             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   24669             :  * 
   24670             :  * 
   24671             :  */
   24672           3 :   __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 311, __pyx_L1_error)
   24673           3 :   __Pyx_GOTREF(__pyx_tuple__20);
   24674           3 :   __Pyx_GIVEREF(__pyx_tuple__20);
   24675             : 
   24676             :   /* "View.MemoryView":314
   24677             :  * 
   24678             :  * 
   24679             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   24680             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   24681             :  * 
   24682             :  */
   24683           3 :   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 314, __pyx_L1_error)
   24684           3 :   __Pyx_GOTREF(__pyx_tuple__21);
   24685           3 :   __Pyx_GIVEREF(__pyx_tuple__21);
   24686             : 
   24687             :   /* "View.MemoryView":315
   24688             :  * 
   24689             :  * cdef contiguous = Enum("<contiguous and direct>")
   24690             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   24691             :  * 
   24692             :  * 
   24693             :  */
   24694           3 :   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 315, __pyx_L1_error)
   24695           3 :   __Pyx_GOTREF(__pyx_tuple__22);
   24696           3 :   __Pyx_GIVEREF(__pyx_tuple__22);
   24697             : 
   24698             :   /* "(tree fragment)":1
   24699             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   24700             :  *     cdef object __pyx_PickleError
   24701             :  *     cdef object __pyx_result
   24702             :  */
   24703           3 :   __pyx_tuple__23 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 1, __pyx_L1_error)
   24704           3 :   __Pyx_GOTREF(__pyx_tuple__23);
   24705           3 :   __Pyx_GIVEREF(__pyx_tuple__23);
   24706           3 :   __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(1, 1, __pyx_L1_error)
   24707             : 
   24708             :   /* "scipy/optimize/_trlib/_trlib.pyx":12
   24709             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   24710             :  * 
   24711             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,             # <<<<<<<<<<<<<<
   24712             :  *                  disp=False):
   24713             :  *         super().__init__(x, fun, jac, hess, hessp)
   24714             :  */
   24715           3 :   __pyx_tuple__25 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_fun, __pyx_n_s_jac, __pyx_n_s_hess, __pyx_n_s_hessp, __pyx_n_s_tol_rel_i, __pyx_n_s_tol_rel_b, __pyx_n_s_disp, __pyx_n_s_itmax, __pyx_n_s_iwork_size, __pyx_n_s_fwork_size, __pyx_n_s_h_pointer, __pyx_n_s_fwork_view, __pyx_n_s_fwork_ptr); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 12, __pyx_L1_error)
   24716           3 :   __Pyx_GOTREF(__pyx_tuple__25);
   24717           3 :   __Pyx_GIVEREF(__pyx_tuple__25);
   24718           3 :   __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_init, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 12, __pyx_L1_error)
   24719           3 :   __pyx_tuple__27 = PyTuple_Pack(3, ((PyObject*)__pyx_float_neg_2_0), ((PyObject*)__pyx_float_neg_3_0), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 12, __pyx_L1_error)
   24720           3 :   __Pyx_GOTREF(__pyx_tuple__27);
   24721           3 :   __Pyx_GIVEREF(__pyx_tuple__27);
   24722             : 
   24723             :   /* "scipy/optimize/_trlib/_trlib.pyx":42
   24724             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   24725             :  * 
   24726             :  *     def solve(self, double trust_radius):             # <<<<<<<<<<<<<<
   24727             :  * 
   24728             :  *         cdef long equality = 0
   24729             :  */
   24730           3 :   __pyx_tuple__28 = PyTuple_Pack(37, __pyx_n_s_self, __pyx_n_s_trust_radius, __pyx_n_s_equality, __pyx_n_s_itmax_lanczos, __pyx_n_s_tol_r_i, __pyx_n_s_tol_a_i, __pyx_n_s_tol_r_b, __pyx_n_s_tol_a_b, __pyx_n_s_zero, __pyx_n_s_obj_lb, __pyx_n_s_ctl_invariant, __pyx_n_s_convexify, __pyx_n_s_earlyterm, __pyx_n_s_g_dot_g, __pyx_n_s_v_dot_g, __pyx_n_s_p_dot_Hp, __pyx_n_s_refine, __pyx_n_s_verbose, __pyx_n_s_unicode, __pyx_n_s_ret, __pyx_n_s_action, __pyx_n_s_it, __pyx_n_s_ityp, __pyx_n_s_itmax, __pyx_n_s_init_2, __pyx_n_s_flt1, __pyx_n_s_flt2, __pyx_n_s_flt3, __pyx_n_s_prefix, __pyx_n_s_iwork_view, __pyx_n_s_fwork_view, __pyx_n_s_timing_view, __pyx_n_s_iwork_ptr, __pyx_n_s_fwork_ptr, __pyx_n_s_timing_ptr, __pyx_n_s_messages, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 42, __pyx_L1_error)
   24731           3 :   __Pyx_GOTREF(__pyx_tuple__28);
   24732           3 :   __Pyx_GIVEREF(__pyx_tuple__28);
   24733           3 :   __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 37, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_solve, 42, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 42, __pyx_L1_error)
   24734             :   __Pyx_RefNannyFinishContext();
   24735             :   return 0;
   24736             :   __pyx_L1_error:;
   24737             :   __Pyx_RefNannyFinishContext();
   24738             :   return -1;
   24739             : }
   24740             : /* #### Code section: init_constants ### */
   24741             : 
   24742           3 : static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
   24743           3 :   if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
   24744           3 :   __pyx_float__5 = PyFloat_FromDouble(.5); if (unlikely(!__pyx_float__5)) __PYX_ERR(0, 1, __pyx_L1_error)
   24745           3 :   __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   24746           3 :   __pyx_float_1e9 = PyFloat_FromDouble(1e9); if (unlikely(!__pyx_float_1e9)) __PYX_ERR(0, 1, __pyx_L1_error)
   24747           3 :   __pyx_float_neg_2_0 = PyFloat_FromDouble(-2.0); if (unlikely(!__pyx_float_neg_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   24748           3 :   __pyx_float_neg_3_0 = PyFloat_FromDouble(-3.0); if (unlikely(!__pyx_float_neg_3_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   24749           3 :   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   24750           3 :   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   24751           3 :   __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
   24752           3 :   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
   24753           3 :   __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
   24754           3 :   __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
   24755           3 :   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
   24756           3 :   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   24757             :   return 0;
   24758             :   __pyx_L1_error:;
   24759             :   return -1;
   24760             : }
   24761             : /* #### Code section: init_globals ### */
   24762             : 
   24763           3 : static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
   24764             :   /* AssertionsEnabled.init */
   24765           3 :   if (likely(__Pyx_init_assertions_enabled() == 0)); else
   24766             : 
   24767           0 : if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
   24768             : 
   24769             :   return 0;
   24770           0 :   __pyx_L1_error:;
   24771           0 :   return -1;
   24772             : }
   24773             : /* #### Code section: init_module ### */
   24774             : 
   24775             : static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
   24776             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
   24777             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
   24778             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
   24779             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
   24780             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
   24781             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
   24782             : 
   24783           3 : static int __Pyx_modinit_global_init_code(void) {
   24784             :   __Pyx_RefNannyDeclarations
   24785           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
   24786             :   /*--- Global init code ---*/
   24787           3 :   __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
   24788           3 :   generic = Py_None; Py_INCREF(Py_None);
   24789           3 :   strided = Py_None; Py_INCREF(Py_None);
   24790           3 :   indirect = Py_None; Py_INCREF(Py_None);
   24791           3 :   contiguous = Py_None; Py_INCREF(Py_None);
   24792           3 :   indirect_contiguous = Py_None; Py_INCREF(Py_None);
   24793           3 :   __Pyx_RefNannyFinishContext();
   24794           3 :   return 0;
   24795             : }
   24796             : 
   24797             : static int __Pyx_modinit_variable_export_code(void) {
   24798             :   __Pyx_RefNannyDeclarations
   24799             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
   24800             :   /*--- Variable export code ---*/
   24801             :   __Pyx_RefNannyFinishContext();
   24802             :   return 0;
   24803             : }
   24804             : 
   24805             : static int __Pyx_modinit_function_export_code(void) {
   24806             :   __Pyx_RefNannyDeclarations
   24807             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
   24808             :   /*--- Function export code ---*/
   24809             :   __Pyx_RefNannyFinishContext();
   24810             :   return 0;
   24811             : }
   24812             : 
   24813           3 : static int __Pyx_modinit_type_init_code(void) {
   24814             :   __Pyx_RefNannyDeclarations
   24815           3 :   PyObject *__pyx_t_1 = NULL;
   24816           3 :   int __pyx_lineno = 0;
   24817           3 :   const char *__pyx_filename = NULL;
   24818           3 :   int __pyx_clineno = 0;
   24819           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
   24820             :   /*--- Type init code ---*/
   24821           3 :   __pyx_vtabptr_array = &__pyx_vtable_array;
   24822           3 :   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
   24823             :   #if CYTHON_USE_TYPE_SPECS
   24824             :   __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
   24825             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24826             :   __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
   24827             :   if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   24828             :     __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
   24829             :   }
   24830             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   24831             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   24832             :   #elif defined(_MSC_VER)
   24833             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   24834             :   #else
   24835             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   24836             :   #endif
   24837             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   24838             :   #else
   24839           3 :   __pyx_array_type = &__pyx_type___pyx_array;
   24840             :   #endif
   24841             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24842             :   #endif
   24843             :   #if !CYTHON_USE_TYPE_SPECS
   24844           3 :   if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   24845             :   #endif
   24846             :   #if PY_MAJOR_VERSION < 3
   24847             :   __pyx_array_type->tp_print = 0;
   24848             :   #endif
   24849           3 :   if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   24850             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24851           3 :   if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   24852             :   #endif
   24853             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24854           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   24855             :   #endif
   24856             :   #if CYTHON_USE_TYPE_SPECS
   24857             :   __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
   24858             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   24859             :   #else
   24860           3 :   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
   24861             :   #endif
   24862             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24863             :   #endif
   24864             :   #if !CYTHON_USE_TYPE_SPECS
   24865           3 :   if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   24866             :   #endif
   24867             :   #if PY_MAJOR_VERSION < 3
   24868             :   __pyx_MemviewEnum_type->tp_print = 0;
   24869             :   #endif
   24870             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24871           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
   24872           3 :     __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   24873             :   }
   24874             :   #endif
   24875             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24876           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   24877             :   #endif
   24878           3 :   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
   24879           3 :   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
   24880           3 :   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
   24881           3 :   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
   24882           3 :   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
   24883           3 :   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
   24884           3 :   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
   24885           3 :   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
   24886           3 :   __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
   24887             :   #if CYTHON_USE_TYPE_SPECS
   24888             :   __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
   24889             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24890             :   __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
   24891             :   if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   24892             :     __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
   24893             :   }
   24894             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   24895             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   24896             :   #elif defined(_MSC_VER)
   24897             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   24898             :   #else
   24899             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   24900             :   #endif
   24901             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   24902             :   #else
   24903           3 :   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
   24904             :   #endif
   24905             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24906             :   #endif
   24907             :   #if !CYTHON_USE_TYPE_SPECS
   24908           3 :   if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   24909             :   #endif
   24910             :   #if PY_MAJOR_VERSION < 3
   24911             :   __pyx_memoryview_type->tp_print = 0;
   24912             :   #endif
   24913             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24914           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
   24915           3 :     __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   24916             :   }
   24917             :   #endif
   24918           3 :   if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   24919             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24920           3 :   if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   24921             :   #endif
   24922             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24923           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   24924             :   #endif
   24925           3 :   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
   24926           3 :   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
   24927           3 :   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
   24928           3 :   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
   24929           3 :   __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
   24930             :   #if CYTHON_USE_TYPE_SPECS
   24931             :   __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
   24932             :   __Pyx_GOTREF(__pyx_t_1);
   24933             :   __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
   24934             :   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   24935             :   if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
   24936             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   24937             :   #else
   24938           3 :   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
   24939             :   #endif
   24940             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24941           3 :   __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
   24942             :   #endif
   24943             :   #if !CYTHON_USE_TYPE_SPECS
   24944           3 :   if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   24945             :   #endif
   24946             :   #if PY_MAJOR_VERSION < 3
   24947             :   __pyx_memoryviewslice_type->tp_print = 0;
   24948             :   #endif
   24949             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24950           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
   24951           3 :     __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   24952             :   }
   24953             :   #endif
   24954           3 :   if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   24955             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24956           3 :   if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   24957             :   #endif
   24958             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   24959           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   24960             :   #endif
   24961             :   __Pyx_RefNannyFinishContext();
   24962             :   return 0;
   24963           0 :   __pyx_L1_error:;
   24964           0 :   __Pyx_XDECREF(__pyx_t_1);
   24965           0 :   __Pyx_RefNannyFinishContext();
   24966           0 :   return -1;
   24967             : }
   24968             : 
   24969           3 : static int __Pyx_modinit_type_import_code(void) {
   24970             :   __Pyx_RefNannyDeclarations
   24971           3 :   PyObject *__pyx_t_1 = NULL;
   24972           3 :   int __pyx_lineno = 0;
   24973           3 :   const char *__pyx_filename = NULL;
   24974           3 :   int __pyx_clineno = 0;
   24975           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
   24976             :   /*--- Type import code ---*/
   24977           3 :   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
   24978           3 :   __Pyx_GOTREF(__pyx_t_1);
   24979           3 :   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
   24980             :   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
   24981             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   24982             :   #elif CYTHON_COMPILING_IN_LIMITED_API
   24983             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   24984             :   #else
   24985             :   sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
   24986             :   #endif
   24987           3 :   __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
   24988           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24989           3 :   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error)
   24990           3 :   __Pyx_GOTREF(__pyx_t_1);
   24991           3 :   __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 271, __pyx_L1_error)
   24992           3 :   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 316, __pyx_L1_error)
   24993           3 :   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 320, __pyx_L1_error)
   24994           3 :   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 359, __pyx_L1_error)
   24995           3 :   __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 847, __pyx_L1_error)
   24996           3 :   __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 849, __pyx_L1_error)
   24997           3 :   __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 851, __pyx_L1_error)
   24998           3 :   __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 853, __pyx_L1_error)
   24999           3 :   __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 855, __pyx_L1_error)
   25000           3 :   __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 857, __pyx_L1_error)
   25001           3 :   __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 859, __pyx_L1_error)
   25002           3 :   __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 861, __pyx_L1_error)
   25003           3 :   __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 863, __pyx_L1_error)
   25004           3 :   __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 865, __pyx_L1_error)
   25005           3 :   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 929, __pyx_L1_error)
   25006           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25007           3 :   __pyx_t_1 = PyImport_ImportModule("scipy._lib.messagestream"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 5, __pyx_L1_error)
   25008           3 :   __Pyx_GOTREF(__pyx_t_1);
   25009           3 :   __pyx_ptype_5scipy_4_lib_13messagestream_MessageStream = __Pyx_ImportType_3_0_11(__pyx_t_1, "scipy._lib.messagestream", "MessageStream", sizeof(struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(struct __pyx_obj_5scipy_4_lib_13messagestream_MessageStream),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream) __PYX_ERR(4, 5, __pyx_L1_error)
   25010           3 :   __pyx_vtabptr_5scipy_4_lib_13messagestream_MessageStream = (struct __pyx_vtabstruct_5scipy_4_lib_13messagestream_MessageStream*)__Pyx_GetVtable(__pyx_ptype_5scipy_4_lib_13messagestream_MessageStream); if (unlikely(!__pyx_vtabptr_5scipy_4_lib_13messagestream_MessageStream)) __PYX_ERR(4, 5, __pyx_L1_error)
   25011           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25012             :   __Pyx_RefNannyFinishContext();
   25013             :   return 0;
   25014           0 :   __pyx_L1_error:;
   25015           0 :   __Pyx_XDECREF(__pyx_t_1);
   25016           0 :   __Pyx_RefNannyFinishContext();
   25017           0 :   return -1;
   25018             : }
   25019             : 
   25020             : static int __Pyx_modinit_variable_import_code(void) {
   25021             :   __Pyx_RefNannyDeclarations
   25022             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
   25023             :   /*--- Variable import code ---*/
   25024             :   __Pyx_RefNannyFinishContext();
   25025             :   return 0;
   25026             : }
   25027             : 
   25028             : static int __Pyx_modinit_function_import_code(void) {
   25029             :   __Pyx_RefNannyDeclarations
   25030             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
   25031             :   /*--- Function import code ---*/
   25032             :   __Pyx_RefNannyFinishContext();
   25033             :   return 0;
   25034             : }
   25035             : 
   25036             : 
   25037             : #if PY_MAJOR_VERSION >= 3
   25038             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   25039             : static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
   25040             : static int __pyx_pymod_exec__trlib(PyObject* module); /*proto*/
   25041             : static PyModuleDef_Slot __pyx_moduledef_slots[] = {
   25042             :   {Py_mod_create, (void*)__pyx_pymod_create},
   25043             :   {Py_mod_exec, (void*)__pyx_pymod_exec__trlib},
   25044             :   {0, NULL}
   25045             : };
   25046             : #endif
   25047             : 
   25048             : #ifdef __cplusplus
   25049             : namespace {
   25050             :   struct PyModuleDef __pyx_moduledef =
   25051             :   #else
   25052             :   static struct PyModuleDef __pyx_moduledef =
   25053             :   #endif
   25054             :   {
   25055             :       PyModuleDef_HEAD_INIT,
   25056             :       "_trlib",
   25057             :       0, /* m_doc */
   25058             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   25059             :       0, /* m_size */
   25060             :     #elif CYTHON_USE_MODULE_STATE
   25061             :       sizeof(__pyx_mstate), /* m_size */
   25062             :     #else
   25063             :       -1, /* m_size */
   25064             :     #endif
   25065             :       __pyx_methods /* m_methods */,
   25066             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   25067             :       __pyx_moduledef_slots, /* m_slots */
   25068             :     #else
   25069             :       NULL, /* m_reload */
   25070             :     #endif
   25071             :     #if CYTHON_USE_MODULE_STATE
   25072             :       __pyx_m_traverse, /* m_traverse */
   25073             :       __pyx_m_clear, /* m_clear */
   25074             :       NULL /* m_free */
   25075             :     #else
   25076             :       NULL, /* m_traverse */
   25077             :       NULL, /* m_clear */
   25078             :       NULL /* m_free */
   25079             :     #endif
   25080             :   };
   25081             :   #ifdef __cplusplus
   25082             : } /* anonymous namespace */
   25083             : #endif
   25084             : #endif
   25085             : 
   25086             : #ifndef CYTHON_NO_PYINIT_EXPORT
   25087             : #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
   25088             : #elif PY_MAJOR_VERSION < 3
   25089             : #ifdef __cplusplus
   25090             : #define __Pyx_PyMODINIT_FUNC extern "C" void
   25091             : #else
   25092             : #define __Pyx_PyMODINIT_FUNC void
   25093             : #endif
   25094             : #else
   25095             : #ifdef __cplusplus
   25096             : #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
   25097             : #else
   25098             : #define __Pyx_PyMODINIT_FUNC PyObject *
   25099             : #endif
   25100             : #endif
   25101             : 
   25102             : 
   25103             : #if PY_MAJOR_VERSION < 3
   25104             : __Pyx_PyMODINIT_FUNC init_trlib(void) CYTHON_SMALL_CODE; /*proto*/
   25105             : __Pyx_PyMODINIT_FUNC init_trlib(void)
   25106             : #else
   25107             : __Pyx_PyMODINIT_FUNC PyInit__trlib(void) CYTHON_SMALL_CODE; /*proto*/
   25108           3 : __Pyx_PyMODINIT_FUNC PyInit__trlib(void)
   25109             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   25110             : {
   25111           3 :   return PyModuleDef_Init(&__pyx_moduledef);
   25112             : }
   25113           3 : static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
   25114             :     #if PY_VERSION_HEX >= 0x030700A1
   25115           3 :     static PY_INT64_T main_interpreter_id = -1;
   25116           3 :     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
   25117           3 :     if (main_interpreter_id == -1) {
   25118           3 :         main_interpreter_id = current_id;
   25119           6 :         return (unlikely(current_id == -1)) ? -1 : 0;
   25120           0 :     } else if (unlikely(main_interpreter_id != current_id))
   25121             :     #else
   25122             :     static PyInterpreterState *main_interpreter = NULL;
   25123             :     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
   25124             :     if (!main_interpreter) {
   25125             :         main_interpreter = current_interpreter;
   25126             :     } else if (unlikely(main_interpreter != current_interpreter))
   25127             :     #endif
   25128             :     {
   25129           0 :         PyErr_SetString(
   25130             :             PyExc_ImportError,
   25131             :             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
   25132           0 :         return -1;
   25133             :     }
   25134             :     return 0;
   25135             : }
   25136             : #if CYTHON_COMPILING_IN_LIMITED_API
   25137             : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
   25138             : #else
   25139          12 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
   25140             : #endif
   25141             : {
   25142          12 :     PyObject *value = PyObject_GetAttrString(spec, from_name);
   25143          12 :     int result = 0;
   25144          12 :     if (likely(value)) {
   25145          12 :         if (allow_none || value != Py_None) {
   25146             : #if CYTHON_COMPILING_IN_LIMITED_API
   25147             :             result = PyModule_AddObject(module, to_name, value);
   25148             : #else
   25149           9 :             result = PyDict_SetItemString(moddict, to_name, value);
   25150             : #endif
   25151             :         }
   25152          12 :         Py_DECREF(value);
   25153           0 :     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
   25154           0 :         PyErr_Clear();
   25155             :     } else {
   25156             :         result = -1;
   25157             :     }
   25158          12 :     return result;
   25159             : }
   25160           3 : static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
   25161           3 :     PyObject *module = NULL, *moddict, *modname;
   25162           3 :     CYTHON_UNUSED_VAR(def);
   25163           3 :     if (__Pyx_check_single_interpreter())
   25164             :         return NULL;
   25165           3 :     if (__pyx_m)
   25166           0 :         return __Pyx_NewRef(__pyx_m);
   25167           3 :     modname = PyObject_GetAttrString(spec, "name");
   25168           3 :     if (unlikely(!modname)) goto bad;
   25169           3 :     module = PyModule_NewObject(modname);
   25170           3 :     Py_DECREF(modname);
   25171           3 :     if (unlikely(!module)) goto bad;
   25172             : #if CYTHON_COMPILING_IN_LIMITED_API
   25173             :     moddict = module;
   25174             : #else
   25175           3 :     moddict = PyModule_GetDict(module);
   25176           3 :     if (unlikely(!moddict)) goto bad;
   25177             : #endif
   25178           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
   25179           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
   25180           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
   25181           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
   25182             :     return module;
   25183           0 : bad:
   25184           0 :     Py_XDECREF(module);
   25185           0 :     return NULL;
   25186             : }
   25187             : 
   25188             : 
   25189           3 : static CYTHON_SMALL_CODE int __pyx_pymod_exec__trlib(PyObject *__pyx_pyinit_module)
   25190             : #endif
   25191             : #endif
   25192             : {
   25193           3 :   int stringtab_initialized = 0;
   25194             :   #if CYTHON_USE_MODULE_STATE
   25195             :   int pystate_addmodule_run = 0;
   25196             :   #endif
   25197           3 :   PyObject *__pyx_t_1 = NULL;
   25198           3 :   PyObject *__pyx_t_2 = NULL;
   25199           3 :   PyObject *__pyx_t_3 = NULL;
   25200           3 :   PyObject *__pyx_t_4 = NULL;
   25201           3 :   PyObject *__pyx_t_5 = NULL;
   25202           3 :   int __pyx_t_6;
   25203           3 :   PyObject *__pyx_t_7 = NULL;
   25204           3 :   static PyThread_type_lock __pyx_t_8[8];
   25205           3 :   int __pyx_t_9;
   25206           3 :   PyObject *__pyx_t_10 = NULL;
   25207           3 :   PyObject *__pyx_t_11 = NULL;
   25208           3 :   int __pyx_lineno = 0;
   25209           3 :   const char *__pyx_filename = NULL;
   25210           3 :   int __pyx_clineno = 0;
   25211             :   __Pyx_RefNannyDeclarations
   25212             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   25213           3 :   if (__pyx_m) {
   25214           0 :     if (__pyx_m == __pyx_pyinit_module) return 0;
   25215           0 :     PyErr_SetString(PyExc_RuntimeError, "Module '_trlib' has already been imported. Re-initialisation is not supported.");
   25216           0 :     return -1;
   25217             :   }
   25218             :   #elif PY_MAJOR_VERSION >= 3
   25219             :   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
   25220             :   #endif
   25221             :   /*--- Module creation code ---*/
   25222             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   25223           3 :   __pyx_m = __pyx_pyinit_module;
   25224           3 :   Py_INCREF(__pyx_m);
   25225             :   #else
   25226             :   #if PY_MAJOR_VERSION < 3
   25227             :   __pyx_m = Py_InitModule4("_trlib", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
   25228             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   25229             :   #elif CYTHON_USE_MODULE_STATE
   25230             :   __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   25231             :   {
   25232             :     int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
   25233             :     __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_trlib" pseudovariable */
   25234             :     if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   25235             :     pystate_addmodule_run = 1;
   25236             :   }
   25237             :   #else
   25238             :   __pyx_m = PyModule_Create(&__pyx_moduledef);
   25239             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   25240             :   #endif
   25241             :   #endif
   25242           3 :   CYTHON_UNUSED_VAR(__pyx_t_1);
   25243           3 :   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
   25244           3 :   Py_INCREF(__pyx_d);
   25245           3 :   __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
   25246           3 :   __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
   25247           3 :   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25248             :   #if CYTHON_REFNANNY
   25249             : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
   25250             : if (!__Pyx_RefNanny) {
   25251             :   PyErr_Clear();
   25252             :   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
   25253             :   if (!__Pyx_RefNanny)
   25254             :       Py_FatalError("failed to import 'refnanny' module");
   25255             : }
   25256             : #endif
   25257           3 :   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__trlib(void)", 0);
   25258           3 :   if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25259             :   #ifdef __Pxy_PyFrame_Initialize_Offsets
   25260             :   __Pxy_PyFrame_Initialize_Offsets();
   25261             :   #endif
   25262           3 :   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
   25263           3 :   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
   25264           3 :   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
   25265             :   #ifdef __Pyx_CyFunction_USED
   25266           3 :   if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25267             :   #endif
   25268             :   #ifdef __Pyx_FusedFunction_USED
   25269             :   if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25270             :   #endif
   25271             :   #ifdef __Pyx_Coroutine_USED
   25272             :   if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25273             :   #endif
   25274             :   #ifdef __Pyx_Generator_USED
   25275             :   if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25276             :   #endif
   25277             :   #ifdef __Pyx_AsyncGen_USED
   25278             :   if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25279             :   #endif
   25280             :   #ifdef __Pyx_StopAsyncIteration_USED
   25281             :   if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25282             :   #endif
   25283             :   /*--- Library function declarations ---*/
   25284             :   /*--- Threads initialization code ---*/
   25285             :   #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
   25286             :   PyEval_InitThreads();
   25287             :   #endif
   25288             :   /*--- Initialize various global constants etc. ---*/
   25289           3 :   if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25290           3 :   stringtab_initialized = 1;
   25291           3 :   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25292             :   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
   25293             :   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25294             :   #endif
   25295           3 :   if (__pyx_module_is_main_scipy__optimize___trlib___trlib) {
   25296           0 :     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25297             :   }
   25298             :   #if PY_MAJOR_VERSION >= 3
   25299             :   {
   25300           3 :     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
   25301           3 :     if (!PyDict_GetItemString(modules, "scipy.optimize._trlib._trlib")) {
   25302           0 :       if (unlikely((PyDict_SetItemString(modules, "scipy.optimize._trlib._trlib", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   25303             :     }
   25304             :   }
   25305             :   #endif
   25306             :   /*--- Builtin init code ---*/
   25307           3 :   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25308             :   /*--- Constants init code ---*/
   25309           3 :   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25310             :   /*--- Global type/function init code ---*/
   25311           3 :   (void)__Pyx_modinit_global_init_code();
   25312           3 :   (void)__Pyx_modinit_variable_export_code();
   25313           3 :   (void)__Pyx_modinit_function_export_code();
   25314           3 :   if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   25315           3 :   if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   25316           3 :   (void)__Pyx_modinit_variable_import_code();
   25317           3 :   (void)__Pyx_modinit_function_import_code();
   25318             :   /*--- Execution code ---*/
   25319             :   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
   25320             :   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25321             :   #endif
   25322             : 
   25323             :   /* "View.MemoryView":99
   25324             :  * 
   25325             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25326             :  * try:             # <<<<<<<<<<<<<<
   25327             :  *     if __import__("sys").version_info >= (3, 3):
   25328             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25329             :  */
   25330             :   {
   25331           3 :     __Pyx_PyThreadState_declare
   25332           3 :     __Pyx_PyThreadState_assign
   25333           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   25334           3 :     __Pyx_XGOTREF(__pyx_t_1);
   25335           3 :     __Pyx_XGOTREF(__pyx_t_2);
   25336           3 :     __Pyx_XGOTREF(__pyx_t_3);
   25337             :     /*try:*/ {
   25338             : 
   25339             :       /* "View.MemoryView":100
   25340             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25341             :  * try:
   25342             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   25343             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25344             :  *     else:
   25345             :  */
   25346           3 :       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   25347           3 :       __Pyx_GOTREF(__pyx_t_4);
   25348           3 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error)
   25349           3 :       __Pyx_GOTREF(__pyx_t_5);
   25350           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25351           3 :       __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__15, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   25352           3 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   25353           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error)
   25354           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25355           3 :       if (__pyx_t_6) {
   25356             : 
   25357             :         /* "View.MemoryView":101
   25358             :  * try:
   25359             :  *     if __import__("sys").version_info >= (3, 3):
   25360             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   25361             :  *     else:
   25362             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   25363             :  */
   25364           3 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   25365           3 :         __Pyx_GOTREF(__pyx_t_4);
   25366           3 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
   25367           3 :         __Pyx_GOTREF(__pyx_t_5);
   25368           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25369           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   25370           3 :         __Pyx_GOTREF(__pyx_t_4);
   25371           3 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   25372           3 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   25373           3 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
   25374           3 :         __Pyx_GIVEREF(__pyx_t_4);
   25375           3 :         __pyx_t_4 = 0;
   25376             : 
   25377             :         /* "View.MemoryView":100
   25378             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25379             :  * try:
   25380             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   25381             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25382             :  *     else:
   25383             :  */
   25384           3 :         goto __pyx_L8;
   25385             :       }
   25386             : 
   25387             :       /* "View.MemoryView":103
   25388             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25389             :  *     else:
   25390             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   25391             :  * except:
   25392             :  * 
   25393             :  */
   25394             :       /*else*/ {
   25395           0 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error)
   25396           0 :         __Pyx_GOTREF(__pyx_t_4);
   25397           0 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error)
   25398           0 :         __Pyx_GOTREF(__pyx_t_5);
   25399           0 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25400           0 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   25401           0 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5);
   25402           0 :         __Pyx_GIVEREF(__pyx_t_5);
   25403           0 :         __pyx_t_5 = 0;
   25404             :       }
   25405           3 :       __pyx_L8:;
   25406             : 
   25407             :       /* "View.MemoryView":99
   25408             :  * 
   25409             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25410             :  * try:             # <<<<<<<<<<<<<<
   25411             :  *     if __import__("sys").version_info >= (3, 3):
   25412             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25413             :  */
   25414             :     }
   25415           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   25416           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   25417           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   25418           3 :     goto __pyx_L7_try_end;
   25419           0 :     __pyx_L2_error:;
   25420           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   25421           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   25422             : 
   25423             :     /* "View.MemoryView":104
   25424             :  *     else:
   25425             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   25426             :  * except:             # <<<<<<<<<<<<<<
   25427             :  * 
   25428             :  *     __pyx_collections_abc_Sequence = None
   25429             :  */
   25430             :     /*except:*/ {
   25431           0 :       __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
   25432           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error)
   25433           0 :       __Pyx_XGOTREF(__pyx_t_5);
   25434           0 :       __Pyx_XGOTREF(__pyx_t_4);
   25435           0 :       __Pyx_XGOTREF(__pyx_t_7);
   25436             : 
   25437             :       /* "View.MemoryView":106
   25438             :  * except:
   25439             :  * 
   25440             :  *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
   25441             :  * 
   25442             :  * 
   25443             :  */
   25444           0 :       __Pyx_INCREF(Py_None);
   25445           0 :       __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   25446           0 :       __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
   25447           0 :       __Pyx_GIVEREF(Py_None);
   25448           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   25449           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   25450           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   25451           0 :       goto __pyx_L3_exception_handled;
   25452             :     }
   25453             : 
   25454             :     /* "View.MemoryView":99
   25455             :  * 
   25456             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25457             :  * try:             # <<<<<<<<<<<<<<
   25458             :  *     if __import__("sys").version_info >= (3, 3):
   25459             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25460             :  */
   25461           0 :     __pyx_L4_except_error:;
   25462           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   25463           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   25464           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   25465           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   25466           0 :     goto __pyx_L1_error;
   25467           0 :     __pyx_L3_exception_handled:;
   25468           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   25469           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   25470           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   25471           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   25472           3 :     __pyx_L7_try_end:;
   25473             :   }
   25474             : 
   25475             :   /* "View.MemoryView":241
   25476             :  * 
   25477             :  * 
   25478             :  *     try:             # <<<<<<<<<<<<<<
   25479             :  *         count = __pyx_collections_abc_Sequence.count
   25480             :  *         index = __pyx_collections_abc_Sequence.index
   25481             :  */
   25482             :   {
   25483           3 :     __Pyx_PyThreadState_declare
   25484           3 :     __Pyx_PyThreadState_assign
   25485           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   25486           3 :     __Pyx_XGOTREF(__pyx_t_3);
   25487           3 :     __Pyx_XGOTREF(__pyx_t_2);
   25488           3 :     __Pyx_XGOTREF(__pyx_t_1);
   25489             :     /*try:*/ {
   25490             : 
   25491             :       /* "View.MemoryView":242
   25492             :  * 
   25493             :  *     try:
   25494             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   25495             :  *         index = __pyx_collections_abc_Sequence.index
   25496             :  *     except:
   25497             :  */
   25498           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error)
   25499           3 :       __Pyx_GOTREF(__pyx_t_7);
   25500           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error)
   25501           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25502           3 :       PyType_Modified(__pyx_array_type);
   25503             : 
   25504             :       /* "View.MemoryView":243
   25505             :  *     try:
   25506             :  *         count = __pyx_collections_abc_Sequence.count
   25507             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   25508             :  *     except:
   25509             :  *         pass
   25510             :  */
   25511           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error)
   25512           3 :       __Pyx_GOTREF(__pyx_t_7);
   25513           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error)
   25514           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25515           3 :       PyType_Modified(__pyx_array_type);
   25516             : 
   25517             :       /* "View.MemoryView":241
   25518             :  * 
   25519             :  * 
   25520             :  *     try:             # <<<<<<<<<<<<<<
   25521             :  *         count = __pyx_collections_abc_Sequence.count
   25522             :  *         index = __pyx_collections_abc_Sequence.index
   25523             :  */
   25524             :     }
   25525           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   25526           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   25527           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   25528           3 :     goto __pyx_L16_try_end;
   25529           0 :     __pyx_L11_error:;
   25530           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   25531           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   25532           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   25533             : 
   25534             :     /* "View.MemoryView":244
   25535             :  *         count = __pyx_collections_abc_Sequence.count
   25536             :  *         index = __pyx_collections_abc_Sequence.index
   25537             :  *     except:             # <<<<<<<<<<<<<<
   25538             :  *         pass
   25539             :  * 
   25540             :  */
   25541             :     /*except:*/ {
   25542           0 :       __Pyx_ErrRestore(0,0,0);
   25543           0 :       goto __pyx_L12_exception_handled;
   25544             :     }
   25545           0 :     __pyx_L12_exception_handled:;
   25546           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   25547           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   25548           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   25549           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   25550           3 :     __pyx_L16_try_end:;
   25551             :   }
   25552             : 
   25553             :   /* "View.MemoryView":309
   25554             :  *         return self.name
   25555             :  * 
   25556             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   25557             :  * cdef strided = Enum("<strided and direct>") # default
   25558             :  * cdef indirect = Enum("<strided and indirect>")
   25559             :  */
   25560           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
   25561           3 :   __Pyx_GOTREF(__pyx_t_7);
   25562           3 :   __Pyx_XGOTREF(generic);
   25563           3 :   __Pyx_DECREF_SET(generic, __pyx_t_7);
   25564           3 :   __Pyx_GIVEREF(__pyx_t_7);
   25565           3 :   __pyx_t_7 = 0;
   25566             : 
   25567             :   /* "View.MemoryView":310
   25568             :  * 
   25569             :  * cdef generic = Enum("<strided and direct or indirect>")
   25570             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   25571             :  * cdef indirect = Enum("<strided and indirect>")
   25572             :  * 
   25573             :  */
   25574           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
   25575           3 :   __Pyx_GOTREF(__pyx_t_7);
   25576           3 :   __Pyx_XGOTREF(strided);
   25577           3 :   __Pyx_DECREF_SET(strided, __pyx_t_7);
   25578           3 :   __Pyx_GIVEREF(__pyx_t_7);
   25579           3 :   __pyx_t_7 = 0;
   25580             : 
   25581             :   /* "View.MemoryView":311
   25582             :  * cdef generic = Enum("<strided and direct or indirect>")
   25583             :  * cdef strided = Enum("<strided and direct>") # default
   25584             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   25585             :  * 
   25586             :  * 
   25587             :  */
   25588           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error)
   25589           3 :   __Pyx_GOTREF(__pyx_t_7);
   25590           3 :   __Pyx_XGOTREF(indirect);
   25591           3 :   __Pyx_DECREF_SET(indirect, __pyx_t_7);
   25592           3 :   __Pyx_GIVEREF(__pyx_t_7);
   25593           3 :   __pyx_t_7 = 0;
   25594             : 
   25595             :   /* "View.MemoryView":314
   25596             :  * 
   25597             :  * 
   25598             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   25599             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   25600             :  * 
   25601             :  */
   25602           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error)
   25603           3 :   __Pyx_GOTREF(__pyx_t_7);
   25604           3 :   __Pyx_XGOTREF(contiguous);
   25605           3 :   __Pyx_DECREF_SET(contiguous, __pyx_t_7);
   25606           3 :   __Pyx_GIVEREF(__pyx_t_7);
   25607           3 :   __pyx_t_7 = 0;
   25608             : 
   25609             :   /* "View.MemoryView":315
   25610             :  * 
   25611             :  * cdef contiguous = Enum("<contiguous and direct>")
   25612             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   25613             :  * 
   25614             :  * 
   25615             :  */
   25616           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error)
   25617           3 :   __Pyx_GOTREF(__pyx_t_7);
   25618           3 :   __Pyx_XGOTREF(indirect_contiguous);
   25619           3 :   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
   25620           3 :   __Pyx_GIVEREF(__pyx_t_7);
   25621           3 :   __pyx_t_7 = 0;
   25622             : 
   25623             :   /* "View.MemoryView":323
   25624             :  * 
   25625             :  * 
   25626             :  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
   25627             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
   25628             :  *     PyThread_allocate_lock(),
   25629             :  */
   25630           3 :   __pyx_memoryview_thread_locks_used = 0;
   25631             : 
   25632             :   /* "View.MemoryView":324
   25633             :  * 
   25634             :  * cdef int __pyx_memoryview_thread_locks_used = 0
   25635             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
   25636             :  *     PyThread_allocate_lock(),
   25637             :  *     PyThread_allocate_lock(),
   25638             :  */
   25639           3 :   __pyx_t_8[0] = PyThread_allocate_lock();
   25640           3 :   __pyx_t_8[1] = PyThread_allocate_lock();
   25641           3 :   __pyx_t_8[2] = PyThread_allocate_lock();
   25642           3 :   __pyx_t_8[3] = PyThread_allocate_lock();
   25643           3 :   __pyx_t_8[4] = PyThread_allocate_lock();
   25644           3 :   __pyx_t_8[5] = PyThread_allocate_lock();
   25645           3 :   __pyx_t_8[6] = PyThread_allocate_lock();
   25646           3 :   __pyx_t_8[7] = PyThread_allocate_lock();
   25647           3 :   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
   25648             : 
   25649             :   /* "View.MemoryView":982
   25650             :  * 
   25651             :  * 
   25652             :  *     try:             # <<<<<<<<<<<<<<
   25653             :  *         count = __pyx_collections_abc_Sequence.count
   25654             :  *         index = __pyx_collections_abc_Sequence.index
   25655             :  */
   25656             :   {
   25657           3 :     __Pyx_PyThreadState_declare
   25658           3 :     __Pyx_PyThreadState_assign
   25659           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   25660           3 :     __Pyx_XGOTREF(__pyx_t_1);
   25661           3 :     __Pyx_XGOTREF(__pyx_t_2);
   25662           3 :     __Pyx_XGOTREF(__pyx_t_3);
   25663             :     /*try:*/ {
   25664             : 
   25665             :       /* "View.MemoryView":983
   25666             :  * 
   25667             :  *     try:
   25668             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   25669             :  *         index = __pyx_collections_abc_Sequence.index
   25670             :  *     except:
   25671             :  */
   25672           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error)
   25673           3 :       __Pyx_GOTREF(__pyx_t_7);
   25674           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error)
   25675           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25676           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   25677             : 
   25678             :       /* "View.MemoryView":984
   25679             :  *     try:
   25680             :  *         count = __pyx_collections_abc_Sequence.count
   25681             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   25682             :  *     except:
   25683             :  *         pass
   25684             :  */
   25685           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error)
   25686           3 :       __Pyx_GOTREF(__pyx_t_7);
   25687           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error)
   25688           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25689           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   25690             : 
   25691             :       /* "View.MemoryView":982
   25692             :  * 
   25693             :  * 
   25694             :  *     try:             # <<<<<<<<<<<<<<
   25695             :  *         count = __pyx_collections_abc_Sequence.count
   25696             :  *         index = __pyx_collections_abc_Sequence.index
   25697             :  */
   25698             :     }
   25699           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   25700           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   25701           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   25702           3 :     goto __pyx_L22_try_end;
   25703           0 :     __pyx_L17_error:;
   25704           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   25705           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   25706           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   25707             : 
   25708             :     /* "View.MemoryView":985
   25709             :  *         count = __pyx_collections_abc_Sequence.count
   25710             :  *         index = __pyx_collections_abc_Sequence.index
   25711             :  *     except:             # <<<<<<<<<<<<<<
   25712             :  *         pass
   25713             :  * 
   25714             :  */
   25715             :     /*except:*/ {
   25716           0 :       __Pyx_ErrRestore(0,0,0);
   25717           0 :       goto __pyx_L18_exception_handled;
   25718             :     }
   25719           0 :     __pyx_L18_exception_handled:;
   25720           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   25721           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   25722           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   25723           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   25724           3 :     __pyx_L22_try_end:;
   25725             :   }
   25726             : 
   25727             :   /* "View.MemoryView":988
   25728             :  *         pass
   25729             :  * 
   25730             :  * try:             # <<<<<<<<<<<<<<
   25731             :  *     if __pyx_collections_abc_Sequence:
   25732             :  * 
   25733             :  */
   25734             :   {
   25735           3 :     __Pyx_PyThreadState_declare
   25736           3 :     __Pyx_PyThreadState_assign
   25737           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   25738           3 :     __Pyx_XGOTREF(__pyx_t_3);
   25739           3 :     __Pyx_XGOTREF(__pyx_t_2);
   25740           3 :     __Pyx_XGOTREF(__pyx_t_1);
   25741             :     /*try:*/ {
   25742             : 
   25743             :       /* "View.MemoryView":989
   25744             :  * 
   25745             :  * try:
   25746             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   25747             :  * 
   25748             :  * 
   25749             :  */
   25750           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error)
   25751           3 :       if (__pyx_t_6) {
   25752             : 
   25753             :         /* "View.MemoryView":993
   25754             :  * 
   25755             :  * 
   25756             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
   25757             :  *         __pyx_collections_abc_Sequence.register(array)
   25758             :  * except:
   25759             :  */
   25760           3 :         __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error)
   25761           3 :         __Pyx_GOTREF(__pyx_t_7);
   25762           3 :         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error)
   25763           3 :         __Pyx_GOTREF(__pyx_t_4);
   25764           3 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25765           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25766             : 
   25767             :         /* "View.MemoryView":994
   25768             :  * 
   25769             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   25770             :  *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
   25771             :  * except:
   25772             :  *     pass  # ignore failure, it's a minor issue
   25773             :  */
   25774           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error)
   25775           3 :         __Pyx_GOTREF(__pyx_t_4);
   25776           3 :         __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error)
   25777           3 :         __Pyx_GOTREF(__pyx_t_7);
   25778           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25779           6 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25780             : 
   25781             :         /* "View.MemoryView":989
   25782             :  * 
   25783             :  * try:
   25784             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   25785             :  * 
   25786             :  * 
   25787             :  */
   25788             :       }
   25789             : 
   25790             :       /* "View.MemoryView":988
   25791             :  *         pass
   25792             :  * 
   25793             :  * try:             # <<<<<<<<<<<<<<
   25794             :  *     if __pyx_collections_abc_Sequence:
   25795             :  * 
   25796             :  */
   25797             :     }
   25798           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   25799           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   25800           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   25801           3 :     goto __pyx_L28_try_end;
   25802           0 :     __pyx_L23_error:;
   25803           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   25804           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   25805           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   25806             : 
   25807             :     /* "View.MemoryView":995
   25808             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   25809             :  *         __pyx_collections_abc_Sequence.register(array)
   25810             :  * except:             # <<<<<<<<<<<<<<
   25811             :  *     pass  # ignore failure, it's a minor issue
   25812             :  * 
   25813             :  */
   25814             :     /*except:*/ {
   25815           0 :       __Pyx_ErrRestore(0,0,0);
   25816           0 :       goto __pyx_L24_exception_handled;
   25817             :     }
   25818           0 :     __pyx_L24_exception_handled:;
   25819           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   25820           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   25821           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   25822           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   25823           3 :     __pyx_L28_try_end:;
   25824             :   }
   25825             : 
   25826             :   /* "(tree fragment)":1
   25827             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   25828             :  *     cdef object __pyx_PickleError
   25829             :  *     cdef object __pyx_result
   25830             :  */
   25831           3 :   __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
   25832           3 :   __Pyx_GOTREF(__pyx_t_7);
   25833           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
   25834           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25835             : 
   25836             :   /* "scipy/optimize/_trlib/_trlib.pyx":1
   25837             :  * from scipy.optimize._trustregion import BaseQuadraticSubproblem             # <<<<<<<<<<<<<<
   25838             :  * import numpy as np
   25839             :  * from . cimport ctrlib
   25840             :  */
   25841           3 :   __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   25842           3 :   __Pyx_GOTREF(__pyx_t_7);
   25843           3 :   __Pyx_INCREF(__pyx_n_s_BaseQuadraticSubproblem);
   25844           3 :   __Pyx_GIVEREF(__pyx_n_s_BaseQuadraticSubproblem);
   25845           3 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_BaseQuadraticSubproblem)) __PYX_ERR(0, 1, __pyx_L1_error);
   25846           3 :   __pyx_t_4 = __Pyx_Import(__pyx_n_s_scipy_optimize__trustregion, __pyx_t_7, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
   25847           3 :   __Pyx_GOTREF(__pyx_t_4);
   25848           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25849           3 :   __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_BaseQuadraticSubproblem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   25850           3 :   __Pyx_GOTREF(__pyx_t_7);
   25851           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_BaseQuadraticSubproblem, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25852           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25853           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25854             : 
   25855             :   /* "scipy/optimize/_trlib/_trlib.pyx":2
   25856             :  * from scipy.optimize._trustregion import BaseQuadraticSubproblem
   25857             :  * import numpy as np             # <<<<<<<<<<<<<<
   25858             :  * from . cimport ctrlib
   25859             :  * cimport numpy as np
   25860             :  */
   25861           3 :   __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2, __pyx_L1_error)
   25862           3 :   __Pyx_GOTREF(__pyx_t_4);
   25863           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_4) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
   25864           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25865             : 
   25866             :   /* "scipy/optimize/_trlib/_trlib.pyx":8
   25867             :  * from scipy._lib.messagestream cimport MessageStream
   25868             :  * 
   25869             :  * np.import_array()             # <<<<<<<<<<<<<<
   25870             :  * 
   25871             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   25872             :  */
   25873           3 :   __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 8, __pyx_L1_error)
   25874             : 
   25875             :   /* "scipy/optimize/_trlib/_trlib.pyx":10
   25876             :  * np.import_array()
   25877             :  * 
   25878             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):             # <<<<<<<<<<<<<<
   25879             :  * 
   25880             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,
   25881             :  */
   25882           3 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_BaseQuadraticSubproblem); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error)
   25883           3 :   __Pyx_GOTREF(__pyx_t_4);
   25884           3 :   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10, __pyx_L1_error)
   25885           3 :   __Pyx_GOTREF(__pyx_t_7);
   25886           3 :   __Pyx_GIVEREF(__pyx_t_4);
   25887           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error);
   25888           3 :   __pyx_t_4 = 0;
   25889           3 :   __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error)
   25890           3 :   __Pyx_GOTREF(__pyx_t_4);
   25891           3 :   __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10, __pyx_L1_error)
   25892           3 :   __Pyx_GOTREF(__pyx_t_5);
   25893           3 :   __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_TRLIBQuadraticSubproblem, __pyx_n_s_TRLIBQuadraticSubproblem, (PyObject *) NULL, __pyx_n_s_scipy_optimize__trlib__trlib, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 10, __pyx_L1_error)
   25894           3 :   __Pyx_GOTREF(__pyx_t_10);
   25895           3 :   if (__pyx_t_4 != __pyx_t_7) {
   25896           0 :     if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 10, __pyx_L1_error)
   25897             :   }
   25898           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25899           3 :   __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 10, __pyx_L1_error)
   25900           3 :   __Pyx_GOTREF(__pyx_t_7);
   25901             : 
   25902             :   /* "scipy/optimize/_trlib/_trlib.pyx":12
   25903             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):
   25904             :  * 
   25905             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,             # <<<<<<<<<<<<<<
   25906             :  *                  disp=False):
   25907             :  *         super().__init__(x, fun, jac, hess, hessp)
   25908             :  */
   25909           3 :   __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_1__init__, 0, __pyx_n_s_TRLIBQuadraticSubproblem___init, NULL, __pyx_n_s_scipy_optimize__trlib__trlib, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 12, __pyx_L1_error)
   25910           3 :   __Pyx_GOTREF(__pyx_t_11);
   25911           3 :   __Pyx_INCREF(__pyx_t_11);
   25912           3 :   PyList_Append(__pyx_t_7, __pyx_t_11);
   25913           3 :   __Pyx_GIVEREF(__pyx_t_11);
   25914           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_tuple__27);
   25915           3 :   if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
   25916           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   25917             : 
   25918             :   /* "scipy/optimize/_trlib/_trlib.pyx":42
   25919             :  *         self.init = ctrlib._TRLIB_CLS_INIT
   25920             :  * 
   25921             :  *     def solve(self, double trust_radius):             # <<<<<<<<<<<<<<
   25922             :  * 
   25923             :  *         cdef long equality = 0
   25924             :  */
   25925           3 :   __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_8optimize_6_trlib_6_trlib_24TRLIBQuadraticSubproblem_3solve, 0, __pyx_n_s_TRLIBQuadraticSubproblem_solve, NULL, __pyx_n_s_scipy_optimize__trlib__trlib, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 42, __pyx_L1_error)
   25926           3 :   __Pyx_GOTREF(__pyx_t_11);
   25927           3 :   if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_n_s_solve, __pyx_t_11) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
   25928           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   25929             : 
   25930             :   /* "scipy/optimize/_trlib/_trlib.pyx":10
   25931             :  * np.import_array()
   25932             :  * 
   25933             :  * class TRLIBQuadraticSubproblem(BaseQuadraticSubproblem):             # <<<<<<<<<<<<<<
   25934             :  * 
   25935             :  *     def __init__(self, x, fun, jac, hess, hessp, tol_rel_i=-2.0, tol_rel_b=-3.0,
   25936             :  */
   25937           3 :   __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TRLIBQuadraticSubproblem, __pyx_t_4, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 10, __pyx_L1_error)
   25938           3 :   __Pyx_GOTREF(__pyx_t_11);
   25939           3 :   if (__Pyx_CyFunction_InitClassCell(__pyx_t_7, __pyx_t_11) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
   25940           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25941           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_TRLIBQuadraticSubproblem, __pyx_t_11) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
   25942           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   25943           3 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   25944           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   25945           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25946             : 
   25947             :   /* "scipy/optimize/_trlib/_trlib.pyx":1
   25948             :  * from scipy.optimize._trustregion import BaseQuadraticSubproblem             # <<<<<<<<<<<<<<
   25949             :  * import numpy as np
   25950             :  * from . cimport ctrlib
   25951             :  */
   25952           3 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
   25953           3 :   __Pyx_GOTREF(__pyx_t_4);
   25954           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25955           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   25956             : 
   25957             :   /*--- Wrapped vars code ---*/
   25958             : 
   25959           3 :   goto __pyx_L0;
   25960           0 :   __pyx_L1_error:;
   25961           0 :   __Pyx_XDECREF(__pyx_t_4);
   25962           0 :   __Pyx_XDECREF(__pyx_t_5);
   25963           0 :   __Pyx_XDECREF(__pyx_t_7);
   25964           0 :   __Pyx_XDECREF(__pyx_t_10);
   25965           0 :   __Pyx_XDECREF(__pyx_t_11);
   25966           0 :   if (__pyx_m) {
   25967           0 :     if (__pyx_d && stringtab_initialized) {
   25968           0 :       __Pyx_AddTraceback("init scipy.optimize._trlib._trlib", __pyx_clineno, __pyx_lineno, __pyx_filename);
   25969             :     }
   25970             :     #if !CYTHON_USE_MODULE_STATE
   25971           0 :     Py_CLEAR(__pyx_m);
   25972             :     #else
   25973             :     Py_DECREF(__pyx_m);
   25974             :     if (pystate_addmodule_run) {
   25975             :       PyObject *tp, *value, *tb;
   25976             :       PyErr_Fetch(&tp, &value, &tb);
   25977             :       PyState_RemoveModule(&__pyx_moduledef);
   25978             :       PyErr_Restore(tp, value, tb);
   25979             :     }
   25980             :     #endif
   25981           0 :   } else if (!PyErr_Occurred()) {
   25982           0 :     PyErr_SetString(PyExc_ImportError, "init scipy.optimize._trlib._trlib");
   25983             :   }
   25984           0 :   __pyx_L0:;
   25985           3 :   __Pyx_RefNannyFinishContext();
   25986             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   25987           3 :   return (__pyx_m != NULL) ? 0 : -1;
   25988             :   #elif PY_MAJOR_VERSION >= 3
   25989             :   return __pyx_m;
   25990             :   #else
   25991             :   return;
   25992             :   #endif
   25993             : }
   25994             : /* #### Code section: cleanup_globals ### */
   25995             : /* #### Code section: cleanup_module ### */
   25996             : /* #### Code section: main_method ### */
   25997             : /* #### Code section: utility_code_pragmas ### */
   25998             : #ifdef _MSC_VER
   25999             : #pragma warning( push )
   26000             : /* Warning 4127: conditional expression is constant
   26001             :  * Cython uses constant conditional expressions to allow in inline functions to be optimized at
   26002             :  * compile-time, so this warning is not useful
   26003             :  */
   26004             : #pragma warning( disable : 4127 )
   26005             : #endif
   26006             : 
   26007             : 
   26008             : 
   26009             : /* #### Code section: utility_code_def ### */
   26010             : 
   26011             : /* --- Runtime support code --- */
   26012             : /* Refnanny */
   26013             : #if CYTHON_REFNANNY
   26014             : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
   26015             :     PyObject *m = NULL, *p = NULL;
   26016             :     void *r = NULL;
   26017             :     m = PyImport_ImportModule(modname);
   26018             :     if (!m) goto end;
   26019             :     p = PyObject_GetAttrString(m, "RefNannyAPI");
   26020             :     if (!p) goto end;
   26021             :     r = PyLong_AsVoidPtr(p);
   26022             : end:
   26023             :     Py_XDECREF(p);
   26024             :     Py_XDECREF(m);
   26025             :     return (__Pyx_RefNannyAPIStruct *)r;
   26026             : }
   26027             : #endif
   26028             : 
   26029             : /* PyErrExceptionMatches */
   26030             : #if CYTHON_FAST_THREAD_STATE
   26031           0 : static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   26032           0 :     Py_ssize_t i, n;
   26033           0 :     n = PyTuple_GET_SIZE(tuple);
   26034             : #if PY_MAJOR_VERSION >= 3
   26035           0 :     for (i=0; i<n; i++) {
   26036           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   26037             :     }
   26038             : #endif
   26039           0 :     for (i=0; i<n; i++) {
   26040           0 :         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
   26041             :     }
   26042             :     return 0;
   26043             : }
   26044           9 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
   26045           9 :     int result;
   26046           9 :     PyObject *exc_type;
   26047             : #if PY_VERSION_HEX >= 0x030C00A6
   26048           9 :     PyObject *current_exception = tstate->current_exception;
   26049           9 :     if (unlikely(!current_exception)) return 0;
   26050           9 :     exc_type = (PyObject*) Py_TYPE(current_exception);
   26051           9 :     if (exc_type == err) return 1;
   26052             : #else
   26053             :     exc_type = tstate->curexc_type;
   26054             :     if (exc_type == err) return 1;
   26055             :     if (unlikely(!exc_type)) return 0;
   26056             : #endif
   26057             :     #if CYTHON_AVOID_BORROWED_REFS
   26058             :     Py_INCREF(exc_type);
   26059             :     #endif
   26060           0 :     if (unlikely(PyTuple_Check(err))) {
   26061           0 :         result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
   26062             :     } else {
   26063           0 :         result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
   26064             :     }
   26065             :     #if CYTHON_AVOID_BORROWED_REFS
   26066             :     Py_DECREF(exc_type);
   26067             :     #endif
   26068             :     return result;
   26069             : }
   26070             : #endif
   26071             : 
   26072             : /* PyErrFetchRestore */
   26073             : #if CYTHON_FAST_THREAD_STATE
   26074           9 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   26075             : #if PY_VERSION_HEX >= 0x030C00A6
   26076           9 :     PyObject *tmp_value;
   26077           9 :     assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
   26078           9 :     if (value) {
   26079             :         #if CYTHON_COMPILING_IN_CPYTHON
   26080           0 :         if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
   26081             :         #endif
   26082           0 :             PyException_SetTraceback(value, tb);
   26083             :     }
   26084           9 :     tmp_value = tstate->current_exception;
   26085           9 :     tstate->current_exception = value;
   26086           9 :     Py_XDECREF(tmp_value);
   26087           9 :     Py_XDECREF(type);
   26088           9 :     Py_XDECREF(tb);
   26089             : #else
   26090             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   26091             :     tmp_type = tstate->curexc_type;
   26092             :     tmp_value = tstate->curexc_value;
   26093             :     tmp_tb = tstate->curexc_traceback;
   26094             :     tstate->curexc_type = type;
   26095             :     tstate->curexc_value = value;
   26096             :     tstate->curexc_traceback = tb;
   26097             :     Py_XDECREF(tmp_type);
   26098             :     Py_XDECREF(tmp_value);
   26099             :     Py_XDECREF(tmp_tb);
   26100             : #endif
   26101           9 : }
   26102           0 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   26103             : #if PY_VERSION_HEX >= 0x030C00A6
   26104           0 :     PyObject* exc_value;
   26105           0 :     exc_value = tstate->current_exception;
   26106           0 :     tstate->current_exception = 0;
   26107           0 :     *value = exc_value;
   26108           0 :     *type = NULL;
   26109           0 :     *tb = NULL;
   26110           0 :     if (exc_value) {
   26111           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   26112           0 :         Py_INCREF(*type);
   26113             :         #if CYTHON_COMPILING_IN_CPYTHON
   26114           0 :         *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
   26115           0 :         Py_XINCREF(*tb);
   26116             :         #else
   26117             :         *tb = PyException_GetTraceback(exc_value);
   26118             :         #endif
   26119             :     }
   26120             : #else
   26121             :     *type = tstate->curexc_type;
   26122             :     *value = tstate->curexc_value;
   26123             :     *tb = tstate->curexc_traceback;
   26124             :     tstate->curexc_type = 0;
   26125             :     tstate->curexc_value = 0;
   26126             :     tstate->curexc_traceback = 0;
   26127             : #endif
   26128           0 : }
   26129             : #endif
   26130             : 
   26131             : /* PyObjectGetAttrStr */
   26132             : #if CYTHON_USE_TYPE_SLOTS
   26133       18895 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
   26134       18895 :     PyTypeObject* tp = Py_TYPE(obj);
   26135       18895 :     if (likely(tp->tp_getattro))
   26136       18895 :         return tp->tp_getattro(obj, attr_name);
   26137             : #if PY_MAJOR_VERSION < 3
   26138             :     if (likely(tp->tp_getattr))
   26139             :         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
   26140             : #endif
   26141           0 :     return PyObject_GetAttr(obj, attr_name);
   26142             : }
   26143             : #endif
   26144             : 
   26145             : /* PyObjectGetAttrStrNoError */
   26146             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   26147           9 : static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
   26148           9 :     __Pyx_PyThreadState_declare
   26149           9 :     __Pyx_PyThreadState_assign
   26150           9 :     if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   26151           9 :         __Pyx_PyErr_Clear();
   26152           9 : }
   26153             : #endif
   26154          90 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
   26155          90 :     PyObject *result;
   26156             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   26157             :     (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
   26158             :     return result;
   26159             : #else
   26160             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
   26161          90 :     PyTypeObject* tp = Py_TYPE(obj);
   26162          90 :     if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
   26163           9 :         return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
   26164             :     }
   26165             : #endif
   26166          81 :     result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
   26167          81 :     if (unlikely(!result)) {
   26168           9 :         __Pyx_PyObject_GetAttrStr_ClearAttributeError();
   26169             :     }
   26170             :     return result;
   26171             : #endif
   26172             : }
   26173             : 
   26174             : /* GetBuiltinName */
   26175          39 : static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
   26176          39 :     PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
   26177          39 :     if (unlikely(!result) && !PyErr_Occurred()) {
   26178           0 :         PyErr_Format(PyExc_NameError,
   26179             : #if PY_MAJOR_VERSION >= 3
   26180             :             "name '%U' is not defined", name);
   26181             : #else
   26182             :             "name '%.200s' is not defined", PyString_AS_STRING(name));
   26183             : #endif
   26184             :     }
   26185          39 :     return result;
   26186             : }
   26187             : 
   26188             : /* TupleAndListFromArray */
   26189             : #if CYTHON_COMPILING_IN_CPYTHON
   26190             : static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
   26191             :     PyObject *v;
   26192             :     Py_ssize_t i;
   26193             :     for (i = 0; i < length; i++) {
   26194             :         v = dest[i] = src[i];
   26195             :         Py_INCREF(v);
   26196             :     }
   26197             : }
   26198             : static CYTHON_INLINE PyObject *
   26199             : __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
   26200             : {
   26201             :     PyObject *res;
   26202             :     if (n <= 0) {
   26203             :         Py_INCREF(__pyx_empty_tuple);
   26204             :         return __pyx_empty_tuple;
   26205             :     }
   26206             :     res = PyTuple_New(n);
   26207             :     if (unlikely(res == NULL)) return NULL;
   26208             :     __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
   26209             :     return res;
   26210             : }
   26211             : static CYTHON_INLINE PyObject *
   26212             : __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
   26213             : {
   26214             :     PyObject *res;
   26215             :     if (n <= 0) {
   26216             :         return PyList_New(0);
   26217             :     }
   26218             :     res = PyList_New(n);
   26219             :     if (unlikely(res == NULL)) return NULL;
   26220             :     __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
   26221             :     return res;
   26222             : }
   26223             : #endif
   26224             : 
   26225             : /* BytesEquals */
   26226             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
   26227             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   26228             :     return PyObject_RichCompareBool(s1, s2, equals);
   26229             : #else
   26230             :     if (s1 == s2) {
   26231             :         return (equals == Py_EQ);
   26232             :     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
   26233             :         const char *ps1, *ps2;
   26234             :         Py_ssize_t length = PyBytes_GET_SIZE(s1);
   26235             :         if (length != PyBytes_GET_SIZE(s2))
   26236             :             return (equals == Py_NE);
   26237             :         ps1 = PyBytes_AS_STRING(s1);
   26238             :         ps2 = PyBytes_AS_STRING(s2);
   26239             :         if (ps1[0] != ps2[0]) {
   26240             :             return (equals == Py_NE);
   26241             :         } else if (length == 1) {
   26242             :             return (equals == Py_EQ);
   26243             :         } else {
   26244             :             int result;
   26245             : #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
   26246             :             Py_hash_t hash1, hash2;
   26247             :             hash1 = ((PyBytesObject*)s1)->ob_shash;
   26248             :             hash2 = ((PyBytesObject*)s2)->ob_shash;
   26249             :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   26250             :                 return (equals == Py_NE);
   26251             :             }
   26252             : #endif
   26253             :             result = memcmp(ps1, ps2, (size_t)length);
   26254             :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   26255             :         }
   26256             :     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
   26257             :         return (equals == Py_NE);
   26258             :     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
   26259             :         return (equals == Py_NE);
   26260             :     } else {
   26261             :         int result;
   26262             :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   26263             :         if (!py_result)
   26264             :             return -1;
   26265             :         result = __Pyx_PyObject_IsTrue(py_result);
   26266             :         Py_DECREF(py_result);
   26267             :         return result;
   26268             :     }
   26269             : #endif
   26270             : }
   26271             : 
   26272             : /* UnicodeEquals */
   26273           0 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
   26274             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   26275             :     return PyObject_RichCompareBool(s1, s2, equals);
   26276             : #else
   26277             : #if PY_MAJOR_VERSION < 3
   26278             :     PyObject* owned_ref = NULL;
   26279             : #endif
   26280           0 :     int s1_is_unicode, s2_is_unicode;
   26281           0 :     if (s1 == s2) {
   26282           0 :         goto return_eq;
   26283             :     }
   26284           0 :     s1_is_unicode = PyUnicode_CheckExact(s1);
   26285           0 :     s2_is_unicode = PyUnicode_CheckExact(s2);
   26286             : #if PY_MAJOR_VERSION < 3
   26287             :     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
   26288             :         owned_ref = PyUnicode_FromObject(s2);
   26289             :         if (unlikely(!owned_ref))
   26290             :             return -1;
   26291             :         s2 = owned_ref;
   26292             :         s2_is_unicode = 1;
   26293             :     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
   26294             :         owned_ref = PyUnicode_FromObject(s1);
   26295             :         if (unlikely(!owned_ref))
   26296             :             return -1;
   26297             :         s1 = owned_ref;
   26298             :         s1_is_unicode = 1;
   26299             :     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
   26300             :         return __Pyx_PyBytes_Equals(s1, s2, equals);
   26301             :     }
   26302             : #endif
   26303           0 :     if (s1_is_unicode & s2_is_unicode) {
   26304           0 :         Py_ssize_t length;
   26305           0 :         int kind;
   26306           0 :         void *data1, *data2;
   26307           0 :         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
   26308             :             return -1;
   26309           0 :         length = __Pyx_PyUnicode_GET_LENGTH(s1);
   26310           0 :         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
   26311           0 :             goto return_ne;
   26312             :         }
   26313             : #if CYTHON_USE_UNICODE_INTERNALS
   26314             :         {
   26315           0 :             Py_hash_t hash1, hash2;
   26316             :         #if CYTHON_PEP393_ENABLED
   26317           0 :             hash1 = ((PyASCIIObject*)s1)->hash;
   26318           0 :             hash2 = ((PyASCIIObject*)s2)->hash;
   26319             :         #else
   26320             :             hash1 = ((PyUnicodeObject*)s1)->hash;
   26321             :             hash2 = ((PyUnicodeObject*)s2)->hash;
   26322             :         #endif
   26323           0 :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   26324           0 :                 goto return_ne;
   26325             :             }
   26326             :         }
   26327             : #endif
   26328           0 :         kind = __Pyx_PyUnicode_KIND(s1);
   26329           0 :         if (kind != __Pyx_PyUnicode_KIND(s2)) {
   26330           0 :             goto return_ne;
   26331             :         }
   26332           0 :         data1 = __Pyx_PyUnicode_DATA(s1);
   26333           0 :         data2 = __Pyx_PyUnicode_DATA(s2);
   26334           0 :         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
   26335           0 :             goto return_ne;
   26336           0 :         } else if (length == 1) {
   26337           0 :             goto return_eq;
   26338             :         } else {
   26339           0 :             int result = memcmp(data1, data2, (size_t)(length * kind));
   26340             :             #if PY_MAJOR_VERSION < 3
   26341             :             Py_XDECREF(owned_ref);
   26342             :             #endif
   26343           0 :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   26344             :         }
   26345           0 :     } else if ((s1 == Py_None) & s2_is_unicode) {
   26346           0 :         goto return_ne;
   26347           0 :     } else if ((s2 == Py_None) & s1_is_unicode) {
   26348           0 :         goto return_ne;
   26349             :     } else {
   26350           0 :         int result;
   26351           0 :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   26352             :         #if PY_MAJOR_VERSION < 3
   26353             :         Py_XDECREF(owned_ref);
   26354             :         #endif
   26355           0 :         if (!py_result)
   26356             :             return -1;
   26357           0 :         result = __Pyx_PyObject_IsTrue(py_result);
   26358           0 :         Py_DECREF(py_result);
   26359           0 :         return result;
   26360             :     }
   26361           0 : return_eq:
   26362             :     #if PY_MAJOR_VERSION < 3
   26363             :     Py_XDECREF(owned_ref);
   26364             :     #endif
   26365           0 :     return (equals == Py_EQ);
   26366           0 : return_ne:
   26367             :     #if PY_MAJOR_VERSION < 3
   26368             :     Py_XDECREF(owned_ref);
   26369             :     #endif
   26370           0 :     return (equals == Py_NE);
   26371             : #endif
   26372             : }
   26373             : 
   26374             : /* fastcall */
   26375             : #if CYTHON_METH_FASTCALL
   26376         624 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
   26377             : {
   26378         624 :     Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
   26379        1248 :     for (i = 0; i < n; i++)
   26380             :     {
   26381        1248 :         if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
   26382             :     }
   26383           0 :     for (i = 0; i < n; i++)
   26384             :     {
   26385           0 :         int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
   26386           0 :         if (unlikely(eq != 0)) {
   26387           0 :             if (unlikely(eq < 0)) return NULL;
   26388           0 :             return kwvalues[i];
   26389             :         }
   26390             :     }
   26391             :     return NULL;
   26392             : }
   26393             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
   26394             : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
   26395             :     Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
   26396             :     PyObject *dict;
   26397             :     dict = PyDict_New();
   26398             :     if (unlikely(!dict))
   26399             :         return NULL;
   26400             :     for (i=0; i<nkwargs; i++) {
   26401             :         PyObject *key = PyTuple_GET_ITEM(kwnames, i);
   26402             :         if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
   26403             :             goto bad;
   26404             :     }
   26405             :     return dict;
   26406             : bad:
   26407             :     Py_DECREF(dict);
   26408             :     return NULL;
   26409             : }
   26410             : #endif
   26411             : #endif
   26412             : 
   26413             : /* RaiseArgTupleInvalid */
   26414           0 : static void __Pyx_RaiseArgtupleInvalid(
   26415             :     const char* func_name,
   26416             :     int exact,
   26417             :     Py_ssize_t num_min,
   26418             :     Py_ssize_t num_max,
   26419             :     Py_ssize_t num_found)
   26420             : {
   26421           0 :     Py_ssize_t num_expected;
   26422           0 :     const char *more_or_less;
   26423           0 :     if (num_found < num_min) {
   26424             :         num_expected = num_min;
   26425             :         more_or_less = "at least";
   26426             :     } else {
   26427           0 :         num_expected = num_max;
   26428           0 :         more_or_less = "at most";
   26429             :     }
   26430           0 :     if (exact) {
   26431           0 :         more_or_less = "exactly";
   26432             :     }
   26433           0 :     PyErr_Format(PyExc_TypeError,
   26434             :                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
   26435             :                  func_name, more_or_less, num_expected,
   26436             :                  (num_expected == 1) ? "" : "s", num_found);
   26437           0 : }
   26438             : 
   26439             : /* RaiseDoubleKeywords */
   26440           0 : static void __Pyx_RaiseDoubleKeywordsError(
   26441             :     const char* func_name,
   26442             :     PyObject* kw_name)
   26443             : {
   26444           0 :     PyErr_Format(PyExc_TypeError,
   26445             :         #if PY_MAJOR_VERSION >= 3
   26446             :         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
   26447             :         #else
   26448             :         "%s() got multiple values for keyword argument '%s'", func_name,
   26449             :         PyString_AsString(kw_name));
   26450             :         #endif
   26451             : }
   26452             : 
   26453             : /* ParseKeywords */
   26454           0 : static int __Pyx_ParseOptionalKeywords(
   26455             :     PyObject *kwds,
   26456             :     PyObject *const *kwvalues,
   26457             :     PyObject **argnames[],
   26458             :     PyObject *kwds2,
   26459             :     PyObject *values[],
   26460             :     Py_ssize_t num_pos_args,
   26461             :     const char* function_name)
   26462             : {
   26463           0 :     PyObject *key = 0, *value = 0;
   26464           0 :     Py_ssize_t pos = 0;
   26465           0 :     PyObject*** name;
   26466           0 :     PyObject*** first_kw_arg = argnames + num_pos_args;
   26467           0 :     int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
   26468           0 :     while (1) {
   26469           0 :         Py_XDECREF(key); key = NULL;
   26470           0 :         Py_XDECREF(value); value = NULL;
   26471           0 :         if (kwds_is_tuple) {
   26472           0 :             Py_ssize_t size;
   26473             : #if CYTHON_ASSUME_SAFE_MACROS
   26474           0 :             size = PyTuple_GET_SIZE(kwds);
   26475             : #else
   26476             :             size = PyTuple_Size(kwds);
   26477             :             if (size < 0) goto bad;
   26478             : #endif
   26479           0 :             if (pos >= size) break;
   26480             : #if CYTHON_AVOID_BORROWED_REFS
   26481             :             key = __Pyx_PySequence_ITEM(kwds, pos);
   26482             :             if (!key) goto bad;
   26483             : #elif CYTHON_ASSUME_SAFE_MACROS
   26484           0 :             key = PyTuple_GET_ITEM(kwds, pos);
   26485             : #else
   26486             :             key = PyTuple_GetItem(kwds, pos);
   26487             :             if (!key) goto bad;
   26488             : #endif
   26489           0 :             value = kwvalues[pos];
   26490           0 :             pos++;
   26491             :         }
   26492             :         else
   26493             :         {
   26494           0 :             if (!PyDict_Next(kwds, &pos, &key, &value)) break;
   26495             : #if CYTHON_AVOID_BORROWED_REFS
   26496             :             Py_INCREF(key);
   26497             : #endif
   26498             :         }
   26499           0 :         name = first_kw_arg;
   26500           0 :         while (*name && (**name != key)) name++;
   26501           0 :         if (*name) {
   26502           0 :             values[name-argnames] = value;
   26503             : #if CYTHON_AVOID_BORROWED_REFS
   26504             :             Py_INCREF(value);
   26505             :             Py_DECREF(key);
   26506             : #endif
   26507           0 :             key = NULL;
   26508           0 :             value = NULL;
   26509           0 :             continue;
   26510             :         }
   26511             : #if !CYTHON_AVOID_BORROWED_REFS
   26512           0 :         Py_INCREF(key);
   26513             : #endif
   26514           0 :         Py_INCREF(value);
   26515           0 :         name = first_kw_arg;
   26516             :         #if PY_MAJOR_VERSION < 3
   26517             :         if (likely(PyString_Check(key))) {
   26518             :             while (*name) {
   26519             :                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
   26520             :                         && _PyString_Eq(**name, key)) {
   26521             :                     values[name-argnames] = value;
   26522             : #if CYTHON_AVOID_BORROWED_REFS
   26523             :                     value = NULL;
   26524             : #endif
   26525             :                     break;
   26526             :                 }
   26527             :                 name++;
   26528             :             }
   26529             :             if (*name) continue;
   26530             :             else {
   26531             :                 PyObject*** argname = argnames;
   26532             :                 while (argname != first_kw_arg) {
   26533             :                     if ((**argname == key) || (
   26534             :                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
   26535             :                              && _PyString_Eq(**argname, key))) {
   26536             :                         goto arg_passed_twice;
   26537             :                     }
   26538             :                     argname++;
   26539             :                 }
   26540             :             }
   26541             :         } else
   26542             :         #endif
   26543           0 :         if (likely(PyUnicode_Check(key))) {
   26544           0 :             while (*name) {
   26545           0 :                 int cmp = (
   26546             :                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   26547           0 :                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   26548             :                 #endif
   26549           0 :                     PyUnicode_Compare(**name, key)
   26550             :                 );
   26551           0 :                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   26552           0 :                 if (cmp == 0) {
   26553           0 :                     values[name-argnames] = value;
   26554             : #if CYTHON_AVOID_BORROWED_REFS
   26555             :                     value = NULL;
   26556             : #endif
   26557           0 :                     break;
   26558             :                 }
   26559           0 :                 name++;
   26560             :             }
   26561           0 :             if (*name) continue;
   26562             :             else {
   26563             :                 PyObject*** argname = argnames;
   26564           0 :                 while (argname != first_kw_arg) {
   26565           0 :                     int cmp = (**argname == key) ? 0 :
   26566             :                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   26567           0 :                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   26568             :                     #endif
   26569           0 :                         PyUnicode_Compare(**argname, key);
   26570           0 :                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   26571           0 :                     if (cmp == 0) goto arg_passed_twice;
   26572           0 :                     argname++;
   26573             :                 }
   26574             :             }
   26575             :         } else
   26576           0 :             goto invalid_keyword_type;
   26577           0 :         if (kwds2) {
   26578           0 :             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
   26579             :         } else {
   26580           0 :             goto invalid_keyword;
   26581             :         }
   26582             :     }
   26583           0 :     Py_XDECREF(key);
   26584           0 :     Py_XDECREF(value);
   26585           0 :     return 0;
   26586           0 : arg_passed_twice:
   26587           0 :     __Pyx_RaiseDoubleKeywordsError(function_name, key);
   26588           0 :     goto bad;
   26589           0 : invalid_keyword_type:
   26590           0 :     PyErr_Format(PyExc_TypeError,
   26591             :         "%.200s() keywords must be strings", function_name);
   26592           0 :     goto bad;
   26593           0 : invalid_keyword:
   26594             :     #if PY_MAJOR_VERSION < 3
   26595             :     PyErr_Format(PyExc_TypeError,
   26596             :         "%.200s() got an unexpected keyword argument '%.200s'",
   26597             :         function_name, PyString_AsString(key));
   26598             :     #else
   26599           0 :     PyErr_Format(PyExc_TypeError,
   26600             :         "%s() got an unexpected keyword argument '%U'",
   26601             :         function_name, key);
   26602             :     #endif
   26603           0 : bad:
   26604           0 :     Py_XDECREF(key);
   26605           0 :     Py_XDECREF(value);
   26606           0 :     return -1;
   26607             : }
   26608             : 
   26609             : /* ArgTypeTest */
   26610           0 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
   26611             : {
   26612           0 :     __Pyx_TypeName type_name;
   26613           0 :     __Pyx_TypeName obj_type_name;
   26614           0 :     if (unlikely(!type)) {
   26615           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   26616           0 :         return 0;
   26617             :     }
   26618           0 :     else if (exact) {
   26619             :         #if PY_MAJOR_VERSION == 2
   26620             :         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
   26621             :         #endif
   26622             :     }
   26623             :     else {
   26624           0 :         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
   26625             :     }
   26626           0 :     type_name = __Pyx_PyType_GetName(type);
   26627           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   26628           0 :     PyErr_Format(PyExc_TypeError,
   26629             :         "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
   26630             :         ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
   26631           0 :     __Pyx_DECREF_TypeName(type_name);
   26632           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   26633           0 :     return 0;
   26634             : }
   26635             : 
   26636             : /* RaiseException */
   26637             : #if PY_MAJOR_VERSION < 3
   26638             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   26639             :     __Pyx_PyThreadState_declare
   26640             :     CYTHON_UNUSED_VAR(cause);
   26641             :     Py_XINCREF(type);
   26642             :     if (!value || value == Py_None)
   26643             :         value = NULL;
   26644             :     else
   26645             :         Py_INCREF(value);
   26646             :     if (!tb || tb == Py_None)
   26647             :         tb = NULL;
   26648             :     else {
   26649             :         Py_INCREF(tb);
   26650             :         if (!PyTraceBack_Check(tb)) {
   26651             :             PyErr_SetString(PyExc_TypeError,
   26652             :                 "raise: arg 3 must be a traceback or None");
   26653             :             goto raise_error;
   26654             :         }
   26655             :     }
   26656             :     if (PyType_Check(type)) {
   26657             : #if CYTHON_COMPILING_IN_PYPY
   26658             :         if (!value) {
   26659             :             Py_INCREF(Py_None);
   26660             :             value = Py_None;
   26661             :         }
   26662             : #endif
   26663             :         PyErr_NormalizeException(&type, &value, &tb);
   26664             :     } else {
   26665             :         if (value) {
   26666             :             PyErr_SetString(PyExc_TypeError,
   26667             :                 "instance exception may not have a separate value");
   26668             :             goto raise_error;
   26669             :         }
   26670             :         value = type;
   26671             :         type = (PyObject*) Py_TYPE(type);
   26672             :         Py_INCREF(type);
   26673             :         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
   26674             :             PyErr_SetString(PyExc_TypeError,
   26675             :                 "raise: exception class must be a subclass of BaseException");
   26676             :             goto raise_error;
   26677             :         }
   26678             :     }
   26679             :     __Pyx_PyThreadState_assign
   26680             :     __Pyx_ErrRestore(type, value, tb);
   26681             :     return;
   26682             : raise_error:
   26683             :     Py_XDECREF(value);
   26684             :     Py_XDECREF(type);
   26685             :     Py_XDECREF(tb);
   26686             :     return;
   26687             : }
   26688             : #else
   26689           0 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   26690           0 :     PyObject* owned_instance = NULL;
   26691           0 :     if (tb == Py_None) {
   26692             :         tb = 0;
   26693           0 :     } else if (tb && !PyTraceBack_Check(tb)) {
   26694           0 :         PyErr_SetString(PyExc_TypeError,
   26695             :             "raise: arg 3 must be a traceback or None");
   26696           0 :         goto bad;
   26697             :     }
   26698           0 :     if (value == Py_None)
   26699           0 :         value = 0;
   26700           0 :     if (PyExceptionInstance_Check(type)) {
   26701           0 :         if (value) {
   26702           0 :             PyErr_SetString(PyExc_TypeError,
   26703             :                 "instance exception may not have a separate value");
   26704           0 :             goto bad;
   26705             :         }
   26706             :         value = type;
   26707             :         type = (PyObject*) Py_TYPE(value);
   26708           0 :     } else if (PyExceptionClass_Check(type)) {
   26709           0 :         PyObject *instance_class = NULL;
   26710           0 :         if (value && PyExceptionInstance_Check(value)) {
   26711           0 :             instance_class = (PyObject*) Py_TYPE(value);
   26712           0 :             if (instance_class != type) {
   26713           0 :                 int is_subclass = PyObject_IsSubclass(instance_class, type);
   26714           0 :                 if (!is_subclass) {
   26715             :                     instance_class = NULL;
   26716           0 :                 } else if (unlikely(is_subclass == -1)) {
   26717           0 :                     goto bad;
   26718             :                 } else {
   26719             :                     type = instance_class;
   26720             :                 }
   26721             :             }
   26722             :         }
   26723             :         if (!instance_class) {
   26724           0 :             PyObject *args;
   26725           0 :             if (!value)
   26726           0 :                 args = PyTuple_New(0);
   26727           0 :             else if (PyTuple_Check(value)) {
   26728           0 :                 Py_INCREF(value);
   26729           0 :                 args = value;
   26730             :             } else
   26731           0 :                 args = PyTuple_Pack(1, value);
   26732           0 :             if (!args)
   26733           0 :                 goto bad;
   26734           0 :             owned_instance = PyObject_Call(type, args, NULL);
   26735           0 :             Py_DECREF(args);
   26736           0 :             if (!owned_instance)
   26737           0 :                 goto bad;
   26738           0 :             value = owned_instance;
   26739           0 :             if (!PyExceptionInstance_Check(value)) {
   26740           0 :                 PyErr_Format(PyExc_TypeError,
   26741             :                              "calling %R should have returned an instance of "
   26742             :                              "BaseException, not %R",
   26743             :                              type, Py_TYPE(value));
   26744           0 :                 goto bad;
   26745             :             }
   26746             :         }
   26747             :     } else {
   26748           0 :         PyErr_SetString(PyExc_TypeError,
   26749             :             "raise: exception class must be a subclass of BaseException");
   26750           0 :         goto bad;
   26751             :     }
   26752           0 :     if (cause) {
   26753           0 :         PyObject *fixed_cause;
   26754           0 :         if (cause == Py_None) {
   26755             :             fixed_cause = NULL;
   26756           0 :         } else if (PyExceptionClass_Check(cause)) {
   26757           0 :             fixed_cause = PyObject_CallObject(cause, NULL);
   26758           0 :             if (fixed_cause == NULL)
   26759           0 :                 goto bad;
   26760           0 :         } else if (PyExceptionInstance_Check(cause)) {
   26761           0 :             fixed_cause = cause;
   26762           0 :             Py_INCREF(fixed_cause);
   26763             :         } else {
   26764           0 :             PyErr_SetString(PyExc_TypeError,
   26765             :                             "exception causes must derive from "
   26766             :                             "BaseException");
   26767           0 :             goto bad;
   26768             :         }
   26769           0 :         PyException_SetCause(value, fixed_cause);
   26770             :     }
   26771           0 :     PyErr_SetObject(type, value);
   26772           0 :     if (tb) {
   26773             :       #if PY_VERSION_HEX >= 0x030C00A6
   26774           0 :         PyException_SetTraceback(value, tb);
   26775             :       #elif CYTHON_FAST_THREAD_STATE
   26776             :         PyThreadState *tstate = __Pyx_PyThreadState_Current;
   26777             :         PyObject* tmp_tb = tstate->curexc_traceback;
   26778             :         if (tb != tmp_tb) {
   26779             :             Py_INCREF(tb);
   26780             :             tstate->curexc_traceback = tb;
   26781             :             Py_XDECREF(tmp_tb);
   26782             :         }
   26783             : #else
   26784             :         PyObject *tmp_type, *tmp_value, *tmp_tb;
   26785             :         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
   26786             :         Py_INCREF(tb);
   26787             :         PyErr_Restore(tmp_type, tmp_value, tb);
   26788             :         Py_XDECREF(tmp_tb);
   26789             : #endif
   26790             :     }
   26791           0 : bad:
   26792           0 :     Py_XDECREF(owned_instance);
   26793           0 :     return;
   26794             : }
   26795             : #endif
   26796             : 
   26797             : /* PyFunctionFastCall */
   26798             : #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
   26799             : static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
   26800             :                                                PyObject *globals) {
   26801             :     PyFrameObject *f;
   26802             :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   26803             :     PyObject **fastlocals;
   26804             :     Py_ssize_t i;
   26805             :     PyObject *result;
   26806             :     assert(globals != NULL);
   26807             :     /* XXX Perhaps we should create a specialized
   26808             :        PyFrame_New() that doesn't take locals, but does
   26809             :        take builtins without sanity checking them.
   26810             :        */
   26811             :     assert(tstate != NULL);
   26812             :     f = PyFrame_New(tstate, co, globals, NULL);
   26813             :     if (f == NULL) {
   26814             :         return NULL;
   26815             :     }
   26816             :     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
   26817             :     for (i = 0; i < na; i++) {
   26818             :         Py_INCREF(*args);
   26819             :         fastlocals[i] = *args++;
   26820             :     }
   26821             :     result = PyEval_EvalFrameEx(f,0);
   26822             :     ++tstate->recursion_depth;
   26823             :     Py_DECREF(f);
   26824             :     --tstate->recursion_depth;
   26825             :     return result;
   26826             : }
   26827             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
   26828             :     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
   26829             :     PyObject *globals = PyFunction_GET_GLOBALS(func);
   26830             :     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
   26831             :     PyObject *closure;
   26832             : #if PY_MAJOR_VERSION >= 3
   26833             :     PyObject *kwdefs;
   26834             : #endif
   26835             :     PyObject *kwtuple, **k;
   26836             :     PyObject **d;
   26837             :     Py_ssize_t nd;
   26838             :     Py_ssize_t nk;
   26839             :     PyObject *result;
   26840             :     assert(kwargs == NULL || PyDict_Check(kwargs));
   26841             :     nk = kwargs ? PyDict_Size(kwargs) : 0;
   26842             :     #if PY_MAJOR_VERSION < 3
   26843             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
   26844             :         return NULL;
   26845             :     }
   26846             :     #else
   26847             :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
   26848             :         return NULL;
   26849             :     }
   26850             :     #endif
   26851             :     if (
   26852             : #if PY_MAJOR_VERSION >= 3
   26853             :             co->co_kwonlyargcount == 0 &&
   26854             : #endif
   26855             :             likely(kwargs == NULL || nk == 0) &&
   26856             :             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
   26857             :         if (argdefs == NULL && co->co_argcount == nargs) {
   26858             :             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
   26859             :             goto done;
   26860             :         }
   26861             :         else if (nargs == 0 && argdefs != NULL
   26862             :                  && co->co_argcount == Py_SIZE(argdefs)) {
   26863             :             /* function called with no arguments, but all parameters have
   26864             :                a default value: use default values as arguments .*/
   26865             :             args = &PyTuple_GET_ITEM(argdefs, 0);
   26866             :             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
   26867             :             goto done;
   26868             :         }
   26869             :     }
   26870             :     if (kwargs != NULL) {
   26871             :         Py_ssize_t pos, i;
   26872             :         kwtuple = PyTuple_New(2 * nk);
   26873             :         if (kwtuple == NULL) {
   26874             :             result = NULL;
   26875             :             goto done;
   26876             :         }
   26877             :         k = &PyTuple_GET_ITEM(kwtuple, 0);
   26878             :         pos = i = 0;
   26879             :         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
   26880             :             Py_INCREF(k[i]);
   26881             :             Py_INCREF(k[i+1]);
   26882             :             i += 2;
   26883             :         }
   26884             :         nk = i / 2;
   26885             :     }
   26886             :     else {
   26887             :         kwtuple = NULL;
   26888             :         k = NULL;
   26889             :     }
   26890             :     closure = PyFunction_GET_CLOSURE(func);
   26891             : #if PY_MAJOR_VERSION >= 3
   26892             :     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
   26893             : #endif
   26894             :     if (argdefs != NULL) {
   26895             :         d = &PyTuple_GET_ITEM(argdefs, 0);
   26896             :         nd = Py_SIZE(argdefs);
   26897             :     }
   26898             :     else {
   26899             :         d = NULL;
   26900             :         nd = 0;
   26901             :     }
   26902             : #if PY_MAJOR_VERSION >= 3
   26903             :     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
   26904             :                                args, (int)nargs,
   26905             :                                k, (int)nk,
   26906             :                                d, (int)nd, kwdefs, closure);
   26907             : #else
   26908             :     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
   26909             :                                args, (int)nargs,
   26910             :                                k, (int)nk,
   26911             :                                d, (int)nd, closure);
   26912             : #endif
   26913             :     Py_XDECREF(kwtuple);
   26914             : done:
   26915             :     Py_LeaveRecursiveCall();
   26916             :     return result;
   26917             : }
   26918             : #endif
   26919             : 
   26920             : /* PyObjectCall */
   26921             : #if CYTHON_COMPILING_IN_CPYTHON
   26922        2021 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   26923        2021 :     PyObject *result;
   26924        2021 :     ternaryfunc call = Py_TYPE(func)->tp_call;
   26925        2021 :     if (unlikely(!call))
   26926           0 :         return PyObject_Call(func, arg, kw);
   26927             :     #if PY_MAJOR_VERSION < 3
   26928             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   26929             :         return NULL;
   26930             :     #else
   26931        2021 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   26932             :         return NULL;
   26933             :     #endif
   26934        2021 :     result = (*call)(func, arg, kw);
   26935        2021 :     Py_LeaveRecursiveCall();
   26936        2021 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   26937           0 :         PyErr_SetString(
   26938             :             PyExc_SystemError,
   26939             :             "NULL result without error in PyObject_Call");
   26940             :     }
   26941             :     return result;
   26942             : }
   26943             : #endif
   26944             : 
   26945             : /* PyObjectCallMethO */
   26946             : #if CYTHON_COMPILING_IN_CPYTHON
   26947           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
   26948           0 :     PyObject *self, *result;
   26949           0 :     PyCFunction cfunc;
   26950           0 :     cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
   26951           0 :     self = __Pyx_CyOrPyCFunction_GET_SELF(func);
   26952             :     #if PY_MAJOR_VERSION < 3
   26953             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   26954             :         return NULL;
   26955             :     #else
   26956           0 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   26957             :         return NULL;
   26958             :     #endif
   26959           0 :     result = cfunc(self, arg);
   26960           0 :     Py_LeaveRecursiveCall();
   26961           0 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   26962           0 :         PyErr_SetString(
   26963             :             PyExc_SystemError,
   26964             :             "NULL result without error in PyObject_Call");
   26965             :     }
   26966             :     return result;
   26967             : }
   26968             : #endif
   26969             : 
   26970             : /* PyObjectFastCall */
   26971             : #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
   26972             : static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
   26973             :     PyObject *argstuple;
   26974             :     PyObject *result = 0;
   26975             :     size_t i;
   26976             :     argstuple = PyTuple_New((Py_ssize_t)nargs);
   26977             :     if (unlikely(!argstuple)) return NULL;
   26978             :     for (i = 0; i < nargs; i++) {
   26979             :         Py_INCREF(args[i]);
   26980             :         if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
   26981             :     }
   26982             :     result = __Pyx_PyObject_Call(func, argstuple, kwargs);
   26983             :   bad:
   26984             :     Py_DECREF(argstuple);
   26985             :     return result;
   26986             : }
   26987             : #endif
   26988        4436 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
   26989        4436 :     Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
   26990             : #if CYTHON_COMPILING_IN_CPYTHON
   26991        4436 :     if (nargs == 0 && kwargs == NULL) {
   26992         188 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
   26993           0 :             return __Pyx_PyObject_CallMethO(func, NULL);
   26994             :     }
   26995        4248 :     else if (nargs == 1 && kwargs == NULL) {
   26996        2739 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
   26997           0 :             return __Pyx_PyObject_CallMethO(func, args[0]);
   26998             :     }
   26999             : #endif
   27000             :     #if PY_VERSION_HEX < 0x030800B1
   27001             :     #if CYTHON_FAST_PYCCALL
   27002             :     if (PyCFunction_Check(func)) {
   27003             :         if (kwargs) {
   27004             :             return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
   27005             :         } else {
   27006             :             return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
   27007             :         }
   27008             :     }
   27009             :     #if PY_VERSION_HEX >= 0x030700A1
   27010             :     if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
   27011             :         return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
   27012             :     }
   27013             :     #endif
   27014             :     #endif
   27015             :     #if CYTHON_FAST_PYCALL
   27016             :     if (PyFunction_Check(func)) {
   27017             :         return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
   27018             :     }
   27019             :     #endif
   27020             :     #endif
   27021        4436 :     if (kwargs == NULL) {
   27022             :         #if CYTHON_VECTORCALL
   27023             :         #if PY_VERSION_HEX < 0x03090000
   27024             :         vectorcallfunc f = _PyVectorcall_Function(func);
   27025             :         #else
   27026        4436 :         vectorcallfunc f = PyVectorcall_Function(func);
   27027             :         #endif
   27028        4436 :         if (f) {
   27029        4248 :             return f(func, args, (size_t)nargs, NULL);
   27030             :         }
   27031             :         #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
   27032             :         if (__Pyx_CyFunction_CheckExact(func)) {
   27033             :             __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
   27034             :             if (f) return f(func, args, (size_t)nargs, NULL);
   27035             :         }
   27036             :         #endif
   27037             :     }
   27038         188 :     if (nargs == 0) {
   27039         188 :         return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
   27040             :     }
   27041             :     #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
   27042           0 :     return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
   27043             :     #else
   27044             :     return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
   27045             :     #endif
   27046             : }
   27047             : 
   27048             : /* RaiseUnexpectedTypeError */
   27049             : static int
   27050           0 : __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
   27051             : {
   27052           0 :     __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   27053           0 :     PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
   27054             :                  expected, obj_type_name);
   27055           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   27056           0 :     return 0;
   27057             : }
   27058             : 
   27059             : /* CIntToDigits */
   27060             : static const char DIGIT_PAIRS_10[2*10*10+1] = {
   27061             :     "00010203040506070809"
   27062             :     "10111213141516171819"
   27063             :     "20212223242526272829"
   27064             :     "30313233343536373839"
   27065             :     "40414243444546474849"
   27066             :     "50515253545556575859"
   27067             :     "60616263646566676869"
   27068             :     "70717273747576777879"
   27069             :     "80818283848586878889"
   27070             :     "90919293949596979899"
   27071             : };
   27072             : static const char DIGIT_PAIRS_8[2*8*8+1] = {
   27073             :     "0001020304050607"
   27074             :     "1011121314151617"
   27075             :     "2021222324252627"
   27076             :     "3031323334353637"
   27077             :     "4041424344454647"
   27078             :     "5051525354555657"
   27079             :     "6061626364656667"
   27080             :     "7071727374757677"
   27081             : };
   27082             : static const char DIGITS_HEX[2*16+1] = {
   27083             :     "0123456789abcdef"
   27084             :     "0123456789ABCDEF"
   27085             : };
   27086             : 
   27087             : /* BuildPyUnicode */
   27088           0 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
   27089             :                                                 int prepend_sign, char padding_char) {
   27090           0 :     PyObject *uval;
   27091           0 :     Py_ssize_t uoffset = ulength - clength;
   27092             : #if CYTHON_USE_UNICODE_INTERNALS
   27093           0 :     Py_ssize_t i;
   27094             : #if CYTHON_PEP393_ENABLED
   27095           0 :     void *udata;
   27096           0 :     uval = PyUnicode_New(ulength, 127);
   27097           0 :     if (unlikely(!uval)) return NULL;
   27098           0 :     udata = PyUnicode_DATA(uval);
   27099             : #else
   27100             :     Py_UNICODE *udata;
   27101             :     uval = PyUnicode_FromUnicode(NULL, ulength);
   27102             :     if (unlikely(!uval)) return NULL;
   27103             :     udata = PyUnicode_AS_UNICODE(uval);
   27104             : #endif
   27105           0 :     if (uoffset > 0) {
   27106           0 :         i = 0;
   27107           0 :         if (prepend_sign) {
   27108           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
   27109           0 :             i++;
   27110             :         }
   27111           0 :         for (; i < uoffset; i++) {
   27112           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
   27113             :         }
   27114             :     }
   27115           0 :     for (i=0; i < clength; i++) {
   27116           0 :         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
   27117             :     }
   27118             : #else
   27119             :     {
   27120             :         PyObject *sign = NULL, *padding = NULL;
   27121             :         uval = NULL;
   27122             :         if (uoffset > 0) {
   27123             :             prepend_sign = !!prepend_sign;
   27124             :             if (uoffset > prepend_sign) {
   27125             :                 padding = PyUnicode_FromOrdinal(padding_char);
   27126             :                 if (likely(padding) && uoffset > prepend_sign + 1) {
   27127             :                     PyObject *tmp;
   27128             :                     PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
   27129             :                     if (unlikely(!repeat)) goto done_or_error;
   27130             :                     tmp = PyNumber_Multiply(padding, repeat);
   27131             :                     Py_DECREF(repeat);
   27132             :                     Py_DECREF(padding);
   27133             :                     padding = tmp;
   27134             :                 }
   27135             :                 if (unlikely(!padding)) goto done_or_error;
   27136             :             }
   27137             :             if (prepend_sign) {
   27138             :                 sign = PyUnicode_FromOrdinal('-');
   27139             :                 if (unlikely(!sign)) goto done_or_error;
   27140             :             }
   27141             :         }
   27142             :         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
   27143             :         if (likely(uval) && padding) {
   27144             :             PyObject *tmp = PyNumber_Add(padding, uval);
   27145             :             Py_DECREF(uval);
   27146             :             uval = tmp;
   27147             :         }
   27148             :         if (likely(uval) && sign) {
   27149             :             PyObject *tmp = PyNumber_Add(sign, uval);
   27150             :             Py_DECREF(uval);
   27151             :             uval = tmp;
   27152             :         }
   27153             : done_or_error:
   27154             :         Py_XDECREF(padding);
   27155             :         Py_XDECREF(sign);
   27156             :     }
   27157             : #endif
   27158             :     return uval;
   27159             : }
   27160             : 
   27161             : /* CIntToPyUnicode */
   27162           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
   27163           0 :     char digits[sizeof(int)*3+2];
   27164           0 :     char *dpos, *end = digits + sizeof(int)*3+2;
   27165           0 :     const char *hex_digits = DIGITS_HEX;
   27166           0 :     Py_ssize_t length, ulength;
   27167           0 :     int prepend_sign, last_one_off;
   27168           0 :     int remaining;
   27169             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   27170             : #pragma GCC diagnostic push
   27171             : #pragma GCC diagnostic ignored "-Wconversion"
   27172             : #endif
   27173           0 :     const int neg_one = (int) -1, const_zero = (int) 0;
   27174             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   27175             : #pragma GCC diagnostic pop
   27176             : #endif
   27177           0 :     const int is_unsigned = neg_one > const_zero;
   27178           0 :     if (format_char == 'X') {
   27179           0 :         hex_digits += 16;
   27180           0 :         format_char = 'x';
   27181             :     }
   27182           0 :     remaining = value;
   27183           0 :     last_one_off = 0;
   27184           0 :     dpos = end;
   27185           0 :     do {
   27186           0 :         int digit_pos;
   27187           0 :         switch (format_char) {
   27188           0 :         case 'o':
   27189           0 :             digit_pos = abs((int)(remaining % (8*8)));
   27190           0 :             remaining = (int) (remaining / (8*8));
   27191           0 :             dpos -= 2;
   27192           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   27193           0 :             last_one_off = (digit_pos < 8);
   27194           0 :             break;
   27195           0 :         case 'd':
   27196           0 :             digit_pos = abs((int)(remaining % (10*10)));
   27197           0 :             remaining = (int) (remaining / (10*10));
   27198           0 :             dpos -= 2;
   27199           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   27200           0 :             last_one_off = (digit_pos < 10);
   27201           0 :             break;
   27202           0 :         case 'x':
   27203           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   27204           0 :             remaining = (int) (remaining / 16);
   27205           0 :             break;
   27206             :         default:
   27207             :             assert(0);
   27208             :             break;
   27209             :         }
   27210           0 :     } while (unlikely(remaining != 0));
   27211           0 :     assert(!last_one_off || *dpos == '0');
   27212           0 :     dpos += last_one_off;
   27213           0 :     length = end - dpos;
   27214           0 :     ulength = length;
   27215           0 :     prepend_sign = 0;
   27216           0 :     if (!is_unsigned && value <= neg_one) {
   27217           0 :         if (padding_char == ' ' || width <= length + 1) {
   27218           0 :             *(--dpos) = '-';
   27219           0 :             ++length;
   27220             :         } else {
   27221             :             prepend_sign = 1;
   27222             :         }
   27223           0 :         ++ulength;
   27224             :     }
   27225           0 :     if (width > ulength) {
   27226             :         ulength = width;
   27227             :     }
   27228           0 :     if (ulength == 1) {
   27229           0 :         return PyUnicode_FromOrdinal(*dpos);
   27230             :     }
   27231           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   27232             : }
   27233             : 
   27234             : /* CIntToPyUnicode */
   27235           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
   27236           0 :     char digits[sizeof(Py_ssize_t)*3+2];
   27237           0 :     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
   27238           0 :     const char *hex_digits = DIGITS_HEX;
   27239           0 :     Py_ssize_t length, ulength;
   27240           0 :     int prepend_sign, last_one_off;
   27241           0 :     Py_ssize_t remaining;
   27242             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   27243             : #pragma GCC diagnostic push
   27244             : #pragma GCC diagnostic ignored "-Wconversion"
   27245             : #endif
   27246           0 :     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
   27247             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   27248             : #pragma GCC diagnostic pop
   27249             : #endif
   27250           0 :     const int is_unsigned = neg_one > const_zero;
   27251           0 :     if (format_char == 'X') {
   27252           0 :         hex_digits += 16;
   27253           0 :         format_char = 'x';
   27254             :     }
   27255           0 :     remaining = value;
   27256           0 :     last_one_off = 0;
   27257           0 :     dpos = end;
   27258           0 :     do {
   27259           0 :         int digit_pos;
   27260           0 :         switch (format_char) {
   27261           0 :         case 'o':
   27262           0 :             digit_pos = abs((int)(remaining % (8*8)));
   27263           0 :             remaining = (Py_ssize_t) (remaining / (8*8));
   27264           0 :             dpos -= 2;
   27265           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   27266           0 :             last_one_off = (digit_pos < 8);
   27267           0 :             break;
   27268           0 :         case 'd':
   27269           0 :             digit_pos = abs((int)(remaining % (10*10)));
   27270           0 :             remaining = (Py_ssize_t) (remaining / (10*10));
   27271           0 :             dpos -= 2;
   27272           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   27273           0 :             last_one_off = (digit_pos < 10);
   27274           0 :             break;
   27275           0 :         case 'x':
   27276           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   27277           0 :             remaining = (Py_ssize_t) (remaining / 16);
   27278           0 :             break;
   27279             :         default:
   27280             :             assert(0);
   27281             :             break;
   27282             :         }
   27283           0 :     } while (unlikely(remaining != 0));
   27284           0 :     assert(!last_one_off || *dpos == '0');
   27285           0 :     dpos += last_one_off;
   27286           0 :     length = end - dpos;
   27287           0 :     ulength = length;
   27288           0 :     prepend_sign = 0;
   27289           0 :     if (!is_unsigned && value <= neg_one) {
   27290           0 :         if (padding_char == ' ' || width <= length + 1) {
   27291           0 :             *(--dpos) = '-';
   27292           0 :             ++length;
   27293             :         } else {
   27294             :             prepend_sign = 1;
   27295             :         }
   27296           0 :         ++ulength;
   27297             :     }
   27298           0 :     if (width > ulength) {
   27299             :         ulength = width;
   27300             :     }
   27301           0 :     if (ulength == 1) {
   27302           0 :         return PyUnicode_FromOrdinal(*dpos);
   27303             :     }
   27304           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   27305             : }
   27306             : 
   27307             : /* JoinPyUnicode */
   27308           0 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
   27309             :                                       Py_UCS4 max_char) {
   27310             : #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   27311           0 :     PyObject *result_uval;
   27312           0 :     int result_ukind, kind_shift;
   27313           0 :     Py_ssize_t i, char_pos;
   27314           0 :     void *result_udata;
   27315           0 :     CYTHON_MAYBE_UNUSED_VAR(max_char);
   27316             : #if CYTHON_PEP393_ENABLED
   27317           0 :     result_uval = PyUnicode_New(result_ulength, max_char);
   27318           0 :     if (unlikely(!result_uval)) return NULL;
   27319           0 :     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
   27320           0 :     kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
   27321           0 :     result_udata = PyUnicode_DATA(result_uval);
   27322             : #else
   27323             :     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
   27324             :     if (unlikely(!result_uval)) return NULL;
   27325             :     result_ukind = sizeof(Py_UNICODE);
   27326             :     kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
   27327             :     result_udata = PyUnicode_AS_UNICODE(result_uval);
   27328             : #endif
   27329           0 :     assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
   27330           0 :     char_pos = 0;
   27331           0 :     for (i=0; i < value_count; i++) {
   27332           0 :         int ukind;
   27333           0 :         Py_ssize_t ulength;
   27334           0 :         void *udata;
   27335           0 :         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
   27336           0 :         if (unlikely(__Pyx_PyUnicode_READY(uval)))
   27337             :             goto bad;
   27338           0 :         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
   27339           0 :         if (unlikely(!ulength))
   27340           0 :             continue;
   27341           0 :         if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
   27342           0 :             goto overflow;
   27343           0 :         ukind = __Pyx_PyUnicode_KIND(uval);
   27344           0 :         udata = __Pyx_PyUnicode_DATA(uval);
   27345           0 :         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
   27346           0 :             memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
   27347             :         } else {
   27348             :             #if PY_VERSION_HEX >= 0x030d0000
   27349             :             if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
   27350             :             #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
   27351           0 :             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
   27352             :             #else
   27353             :             Py_ssize_t j;
   27354             :             for (j=0; j < ulength; j++) {
   27355             :                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
   27356             :                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
   27357             :             }
   27358             :             #endif
   27359             :         }
   27360           0 :         char_pos += ulength;
   27361             :     }
   27362             :     return result_uval;
   27363           0 : overflow:
   27364           0 :     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
   27365           0 : bad:
   27366           0 :     Py_DECREF(result_uval);
   27367             :     return NULL;
   27368             : #else
   27369             :     CYTHON_UNUSED_VAR(max_char);
   27370             :     CYTHON_UNUSED_VAR(result_ulength);
   27371             :     CYTHON_UNUSED_VAR(value_count);
   27372             :     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
   27373             : #endif
   27374             : }
   27375             : 
   27376             : /* GetAttr */
   27377           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
   27378             : #if CYTHON_USE_TYPE_SLOTS
   27379             : #if PY_MAJOR_VERSION >= 3
   27380           0 :     if (likely(PyUnicode_Check(n)))
   27381             : #else
   27382             :     if (likely(PyString_Check(n)))
   27383             : #endif
   27384           0 :         return __Pyx_PyObject_GetAttrStr(o, n);
   27385             : #endif
   27386           0 :     return PyObject_GetAttr(o, n);
   27387             : }
   27388             : 
   27389             : /* GetItemInt */
   27390           0 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
   27391           0 :     PyObject *r;
   27392           0 :     if (unlikely(!j)) return NULL;
   27393           0 :     r = PyObject_GetItem(o, j);
   27394           0 :     Py_DECREF(j);
   27395             :     return r;
   27396             : }
   27397             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
   27398             :                                                               CYTHON_NCP_UNUSED int wraparound,
   27399             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   27400             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   27401             :     Py_ssize_t wrapped_i = i;
   27402             :     if (wraparound & unlikely(i < 0)) {
   27403             :         wrapped_i += PyList_GET_SIZE(o);
   27404             :     }
   27405             :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
   27406             :         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
   27407             :         Py_INCREF(r);
   27408             :         return r;
   27409             :     }
   27410             :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   27411             : #else
   27412             :     return PySequence_GetItem(o, i);
   27413             : #endif
   27414             : }
   27415           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
   27416             :                                                               CYTHON_NCP_UNUSED int wraparound,
   27417             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   27418             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   27419           0 :     Py_ssize_t wrapped_i = i;
   27420           0 :     if (wraparound & unlikely(i < 0)) {
   27421           0 :         wrapped_i += PyTuple_GET_SIZE(o);
   27422             :     }
   27423           0 :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
   27424           0 :         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
   27425           0 :         Py_INCREF(r);
   27426           0 :         return r;
   27427             :     }
   27428           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   27429             : #else
   27430             :     return PySequence_GetItem(o, i);
   27431             : #endif
   27432             : }
   27433         812 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
   27434             :                                                      CYTHON_NCP_UNUSED int wraparound,
   27435             :                                                      CYTHON_NCP_UNUSED int boundscheck) {
   27436             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   27437         812 :     if (is_list || PyList_CheckExact(o)) {
   27438           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
   27439           0 :         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
   27440           0 :             PyObject *r = PyList_GET_ITEM(o, n);
   27441           0 :             Py_INCREF(r);
   27442           0 :             return r;
   27443             :         }
   27444             :     }
   27445         812 :     else if (PyTuple_CheckExact(o)) {
   27446         624 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
   27447         624 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
   27448         624 :             PyObject *r = PyTuple_GET_ITEM(o, n);
   27449         624 :             Py_INCREF(r);
   27450         624 :             return r;
   27451             :         }
   27452             :     } else {
   27453         188 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   27454         188 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   27455         188 :         if (mm && mm->mp_subscript) {
   27456         188 :             PyObject *r, *key = PyInt_FromSsize_t(i);
   27457         188 :             if (unlikely(!key)) return NULL;
   27458         188 :             r = mm->mp_subscript(o, key);
   27459         188 :             Py_DECREF(key);
   27460         188 :             return r;
   27461             :         }
   27462           0 :         if (likely(sm && sm->sq_item)) {
   27463           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   27464           0 :                 Py_ssize_t l = sm->sq_length(o);
   27465           0 :                 if (likely(l >= 0)) {
   27466           0 :                     i += l;
   27467             :                 } else {
   27468           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   27469             :                         return NULL;
   27470           0 :                     PyErr_Clear();
   27471             :                 }
   27472             :             }
   27473           0 :             return sm->sq_item(o, i);
   27474             :         }
   27475             :     }
   27476             : #else
   27477             :     if (is_list || !PyMapping_Check(o)) {
   27478             :         return PySequence_GetItem(o, i);
   27479             :     }
   27480             : #endif
   27481           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   27482             : }
   27483             : 
   27484             : /* PyObjectCallOneArg */
   27485           7 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
   27486           7 :     PyObject *args[2] = {NULL, arg};
   27487           7 :     return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   27488             : }
   27489             : 
   27490             : /* ObjectGetItem */
   27491             : #if CYTHON_USE_TYPE_SLOTS
   27492           0 : static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
   27493           0 :     PyObject *runerr = NULL;
   27494           0 :     Py_ssize_t key_value;
   27495           0 :     key_value = __Pyx_PyIndex_AsSsize_t(index);
   27496           0 :     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
   27497           0 :         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
   27498             :     }
   27499           0 :     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
   27500           0 :         __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
   27501           0 :         PyErr_Clear();
   27502           0 :         PyErr_Format(PyExc_IndexError,
   27503             :             "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
   27504             :         __Pyx_DECREF_TypeName(index_type_name);
   27505             :     }
   27506             :     return NULL;
   27507             : }
   27508           0 : static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
   27509           0 :     __Pyx_TypeName obj_type_name;
   27510           0 :     if (likely(PyType_Check(obj))) {
   27511           0 :         PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
   27512           0 :         if (!meth) {
   27513           0 :             PyErr_Clear();
   27514             :         } else {
   27515           0 :             PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
   27516           0 :             Py_DECREF(meth);
   27517           0 :             return result;
   27518             :         }
   27519             :     }
   27520           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   27521           0 :     PyErr_Format(PyExc_TypeError,
   27522             :         "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
   27523           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   27524           0 :     return NULL;
   27525             : }
   27526          91 : static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
   27527          91 :     PyTypeObject *tp = Py_TYPE(obj);
   27528          91 :     PyMappingMethods *mm = tp->tp_as_mapping;
   27529          91 :     PySequenceMethods *sm = tp->tp_as_sequence;
   27530          91 :     if (likely(mm && mm->mp_subscript)) {
   27531          91 :         return mm->mp_subscript(obj, key);
   27532             :     }
   27533           0 :     if (likely(sm && sm->sq_item)) {
   27534           0 :         return __Pyx_PyObject_GetIndex(obj, key);
   27535             :     }
   27536           0 :     return __Pyx_PyObject_GetItem_Slow(obj, key);
   27537             : }
   27538             : #endif
   27539             : 
   27540             : /* KeywordStringCheck */
   27541           0 : static int __Pyx_CheckKeywordStrings(
   27542             :     PyObject *kw,
   27543             :     const char* function_name,
   27544             :     int kw_allowed)
   27545             : {
   27546           0 :     PyObject* key = 0;
   27547           0 :     Py_ssize_t pos = 0;
   27548             : #if CYTHON_COMPILING_IN_PYPY
   27549             :     if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
   27550             :         goto invalid_keyword;
   27551             :     return 1;
   27552             : #else
   27553           0 :     if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
   27554           0 :         Py_ssize_t kwsize;
   27555             : #if CYTHON_ASSUME_SAFE_MACROS
   27556           0 :         kwsize = PyTuple_GET_SIZE(kw);
   27557             : #else
   27558             :         kwsize = PyTuple_Size(kw);
   27559             :         if (kwsize < 0) return 0;
   27560             : #endif
   27561           0 :         if (unlikely(kwsize == 0))
   27562             :             return 1;
   27563           0 :         if (!kw_allowed) {
   27564             : #if CYTHON_ASSUME_SAFE_MACROS
   27565           0 :             key = PyTuple_GET_ITEM(kw, 0);
   27566             : #else
   27567             :             key = PyTuple_GetItem(kw, pos);
   27568             :             if (!key) return 0;
   27569             : #endif
   27570           0 :             goto invalid_keyword;
   27571             :         }
   27572             : #if PY_VERSION_HEX < 0x03090000
   27573             :         for (pos = 0; pos < kwsize; pos++) {
   27574             : #if CYTHON_ASSUME_SAFE_MACROS
   27575             :             key = PyTuple_GET_ITEM(kw, pos);
   27576             : #else
   27577             :             key = PyTuple_GetItem(kw, pos);
   27578             :             if (!key) return 0;
   27579             : #endif
   27580             :             if (unlikely(!PyUnicode_Check(key)))
   27581             :                 goto invalid_keyword_type;
   27582             :         }
   27583             : #endif
   27584             :         return 1;
   27585             :     }
   27586           0 :     while (PyDict_Next(kw, &pos, &key, 0)) {
   27587             :         #if PY_MAJOR_VERSION < 3
   27588             :         if (unlikely(!PyString_Check(key)))
   27589             :         #endif
   27590           0 :             if (unlikely(!PyUnicode_Check(key)))
   27591           0 :                 goto invalid_keyword_type;
   27592             :     }
   27593           0 :     if (!kw_allowed && unlikely(key))
   27594           0 :         goto invalid_keyword;
   27595             :     return 1;
   27596           0 : invalid_keyword_type:
   27597           0 :     PyErr_Format(PyExc_TypeError,
   27598             :         "%.200s() keywords must be strings", function_name);
   27599           0 :     return 0;
   27600             : #endif
   27601           0 : invalid_keyword:
   27602             :     #if PY_MAJOR_VERSION < 3
   27603             :     PyErr_Format(PyExc_TypeError,
   27604             :         "%.200s() got an unexpected keyword argument '%.200s'",
   27605             :         function_name, PyString_AsString(key));
   27606             :     #else
   27607           0 :     PyErr_Format(PyExc_TypeError,
   27608             :         "%s() got an unexpected keyword argument '%U'",
   27609             :         function_name, key);
   27610             :     #endif
   27611           0 :     return 0;
   27612             : }
   27613             : 
   27614             : /* DivInt[Py_ssize_t] */
   27615           0 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
   27616           0 :     Py_ssize_t q = a / b;
   27617           0 :     Py_ssize_t r = a - q*b;
   27618           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   27619           0 :     return q;
   27620             : }
   27621             : 
   27622             : /* GetAttr3 */
   27623             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   27624           0 : static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
   27625           0 :     __Pyx_PyThreadState_declare
   27626           0 :     __Pyx_PyThreadState_assign
   27627           0 :     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   27628             :         return NULL;
   27629           0 :     __Pyx_PyErr_Clear();
   27630           0 :     Py_INCREF(d);
   27631             :     return d;
   27632             : }
   27633             : #endif
   27634           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
   27635           0 :     PyObject *r;
   27636             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   27637             :     int res = PyObject_GetOptionalAttr(o, n, &r);
   27638             :     return (res != 0) ? r : __Pyx_NewRef(d);
   27639             : #else
   27640             :   #if CYTHON_USE_TYPE_SLOTS
   27641           0 :     if (likely(PyString_Check(n))) {
   27642           0 :         r = __Pyx_PyObject_GetAttrStrNoError(o, n);
   27643           0 :         if (unlikely(!r) && likely(!PyErr_Occurred())) {
   27644           0 :             r = __Pyx_NewRef(d);
   27645             :         }
   27646           0 :         return r;
   27647             :     }
   27648             :   #endif
   27649           0 :     r = PyObject_GetAttr(o, n);
   27650           0 :     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
   27651             : #endif
   27652             : }
   27653             : 
   27654             : /* PyDictVersioning */
   27655             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
   27656             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
   27657             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   27658             :     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
   27659             : }
   27660             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
   27661             :     PyObject **dictptr = NULL;
   27662             :     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
   27663             :     if (offset) {
   27664             : #if CYTHON_COMPILING_IN_CPYTHON
   27665             :         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
   27666             : #else
   27667             :         dictptr = _PyObject_GetDictPtr(obj);
   27668             : #endif
   27669             :     }
   27670             :     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
   27671             : }
   27672             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
   27673             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   27674             :     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
   27675             :         return 0;
   27676             :     return obj_dict_version == __Pyx_get_object_dict_version(obj);
   27677             : }
   27678             : #endif
   27679             : 
   27680             : /* GetModuleGlobalName */
   27681             : #if CYTHON_USE_DICT_VERSIONS
   27682             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
   27683             : #else
   27684        3284 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
   27685             : #endif
   27686             : {
   27687        3284 :     PyObject *result;
   27688             : #if !CYTHON_AVOID_BORROWED_REFS
   27689             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
   27690        3284 :     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
   27691             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   27692        3284 :     if (likely(result)) {
   27693        6568 :         return __Pyx_NewRef(result);
   27694           0 :     } else if (unlikely(PyErr_Occurred())) {
   27695             :         return NULL;
   27696             :     }
   27697             : #elif CYTHON_COMPILING_IN_LIMITED_API
   27698             :     if (unlikely(!__pyx_m)) {
   27699             :         return NULL;
   27700             :     }
   27701             :     result = PyObject_GetAttr(__pyx_m, name);
   27702             :     if (likely(result)) {
   27703             :         return result;
   27704             :     }
   27705             : #else
   27706             :     result = PyDict_GetItem(__pyx_d, name);
   27707             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   27708             :     if (likely(result)) {
   27709             :         return __Pyx_NewRef(result);
   27710             :     }
   27711             : #endif
   27712             : #else
   27713             :     result = PyObject_GetItem(__pyx_d, name);
   27714             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   27715             :     if (likely(result)) {
   27716             :         return __Pyx_NewRef(result);
   27717             :     }
   27718             :     PyErr_Clear();
   27719             : #endif
   27720           0 :     return __Pyx_GetBuiltinName(name);
   27721             : }
   27722             : 
   27723             : /* RaiseTooManyValuesToUnpack */
   27724           0 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
   27725           0 :     PyErr_Format(PyExc_ValueError,
   27726             :                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
   27727           0 : }
   27728             : 
   27729             : /* RaiseNeedMoreValuesToUnpack */
   27730           0 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
   27731           0 :     PyErr_Format(PyExc_ValueError,
   27732             :                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
   27733             :                  index, (index == 1) ? "" : "s");
   27734           0 : }
   27735             : 
   27736             : /* RaiseNoneIterError */
   27737           0 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
   27738           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   27739             : }
   27740             : 
   27741             : /* ExtTypeTest */
   27742           0 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
   27743           0 :     __Pyx_TypeName obj_type_name;
   27744           0 :     __Pyx_TypeName type_name;
   27745           0 :     if (unlikely(!type)) {
   27746           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   27747           0 :         return 0;
   27748             :     }
   27749           0 :     if (likely(__Pyx_TypeCheck(obj, type)))
   27750             :         return 1;
   27751           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   27752           0 :     type_name = __Pyx_PyType_GetName(type);
   27753           0 :     PyErr_Format(PyExc_TypeError,
   27754             :                  "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
   27755             :                  obj_type_name, type_name);
   27756           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   27757           0 :     __Pyx_DECREF_TypeName(type_name);
   27758           0 :     return 0;
   27759             : }
   27760             : 
   27761             : /* GetTopmostException */
   27762             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
   27763             : static _PyErr_StackItem *
   27764          15 : __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
   27765             : {
   27766          15 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   27767          75 :     while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
   27768          75 :            exc_info->previous_item != NULL)
   27769             :     {
   27770             :         exc_info = exc_info->previous_item;
   27771             :     }
   27772          15 :     return exc_info;
   27773             : }
   27774             : #endif
   27775             : 
   27776             : /* SaveResetException */
   27777             : #if CYTHON_FAST_THREAD_STATE
   27778          15 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   27779             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   27780          15 :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   27781          15 :     PyObject *exc_value = exc_info->exc_value;
   27782          15 :     if (exc_value == NULL || exc_value == Py_None) {
   27783          15 :         *value = NULL;
   27784          15 :         *type = NULL;
   27785          15 :         *tb = NULL;
   27786             :     } else {
   27787           0 :         *value = exc_value;
   27788           0 :         Py_INCREF(*value);
   27789           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   27790           0 :         Py_INCREF(*type);
   27791           0 :         *tb = PyException_GetTraceback(exc_value);
   27792             :     }
   27793             :   #elif CYTHON_USE_EXC_INFO_STACK
   27794             :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   27795             :     *type = exc_info->exc_type;
   27796             :     *value = exc_info->exc_value;
   27797             :     *tb = exc_info->exc_traceback;
   27798             :     Py_XINCREF(*type);
   27799             :     Py_XINCREF(*value);
   27800             :     Py_XINCREF(*tb);
   27801             :   #else
   27802             :     *type = tstate->exc_type;
   27803             :     *value = tstate->exc_value;
   27804             :     *tb = tstate->exc_traceback;
   27805             :     Py_XINCREF(*type);
   27806             :     Py_XINCREF(*value);
   27807             :     Py_XINCREF(*tb);
   27808             :   #endif
   27809          15 : }
   27810           0 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   27811             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   27812           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   27813           0 :     PyObject *tmp_value = exc_info->exc_value;
   27814           0 :     exc_info->exc_value = value;
   27815           0 :     Py_XDECREF(tmp_value);
   27816           0 :     Py_XDECREF(type);
   27817           0 :     Py_XDECREF(tb);
   27818             :   #else
   27819             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   27820             :     #if CYTHON_USE_EXC_INFO_STACK
   27821             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   27822             :     tmp_type = exc_info->exc_type;
   27823             :     tmp_value = exc_info->exc_value;
   27824             :     tmp_tb = exc_info->exc_traceback;
   27825             :     exc_info->exc_type = type;
   27826             :     exc_info->exc_value = value;
   27827             :     exc_info->exc_traceback = tb;
   27828             :     #else
   27829             :     tmp_type = tstate->exc_type;
   27830             :     tmp_value = tstate->exc_value;
   27831             :     tmp_tb = tstate->exc_traceback;
   27832             :     tstate->exc_type = type;
   27833             :     tstate->exc_value = value;
   27834             :     tstate->exc_traceback = tb;
   27835             :     #endif
   27836             :     Py_XDECREF(tmp_type);
   27837             :     Py_XDECREF(tmp_value);
   27838             :     Py_XDECREF(tmp_tb);
   27839             :   #endif
   27840           0 : }
   27841             : #endif
   27842             : 
   27843             : /* GetException */
   27844             : #if CYTHON_FAST_THREAD_STATE
   27845           0 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
   27846             : #else
   27847             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
   27848             : #endif
   27849             : {
   27850           0 :     PyObject *local_type = NULL, *local_value, *local_tb = NULL;
   27851             : #if CYTHON_FAST_THREAD_STATE
   27852           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   27853             :   #if PY_VERSION_HEX >= 0x030C00A6
   27854           0 :     local_value = tstate->current_exception;
   27855           0 :     tstate->current_exception = 0;
   27856           0 :     if (likely(local_value)) {
   27857           0 :         local_type = (PyObject*) Py_TYPE(local_value);
   27858           0 :         Py_INCREF(local_type);
   27859           0 :         local_tb = PyException_GetTraceback(local_value);
   27860             :     }
   27861             :   #else
   27862             :     local_type = tstate->curexc_type;
   27863             :     local_value = tstate->curexc_value;
   27864             :     local_tb = tstate->curexc_traceback;
   27865             :     tstate->curexc_type = 0;
   27866             :     tstate->curexc_value = 0;
   27867             :     tstate->curexc_traceback = 0;
   27868             :   #endif
   27869             : #else
   27870             :     PyErr_Fetch(&local_type, &local_value, &local_tb);
   27871             : #endif
   27872           0 :     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
   27873             : #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
   27874           0 :     if (unlikely(tstate->current_exception))
   27875             : #elif CYTHON_FAST_THREAD_STATE
   27876             :     if (unlikely(tstate->curexc_type))
   27877             : #else
   27878             :     if (unlikely(PyErr_Occurred()))
   27879             : #endif
   27880           0 :         goto bad;
   27881             :     #if PY_MAJOR_VERSION >= 3
   27882           0 :     if (local_tb) {
   27883           0 :         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
   27884           0 :             goto bad;
   27885             :     }
   27886             :     #endif
   27887           0 :     Py_XINCREF(local_tb);
   27888           0 :     Py_XINCREF(local_type);
   27889           0 :     Py_XINCREF(local_value);
   27890           0 :     *type = local_type;
   27891           0 :     *value = local_value;
   27892           0 :     *tb = local_tb;
   27893             : #if CYTHON_FAST_THREAD_STATE
   27894             :     #if CYTHON_USE_EXC_INFO_STACK
   27895             :     {
   27896           0 :         _PyErr_StackItem *exc_info = tstate->exc_info;
   27897             :       #if PY_VERSION_HEX >= 0x030B00a4
   27898           0 :         tmp_value = exc_info->exc_value;
   27899           0 :         exc_info->exc_value = local_value;
   27900           0 :         tmp_type = NULL;
   27901           0 :         tmp_tb = NULL;
   27902           0 :         Py_XDECREF(local_type);
   27903           0 :         Py_XDECREF(local_tb);
   27904             :       #else
   27905             :         tmp_type = exc_info->exc_type;
   27906             :         tmp_value = exc_info->exc_value;
   27907             :         tmp_tb = exc_info->exc_traceback;
   27908             :         exc_info->exc_type = local_type;
   27909             :         exc_info->exc_value = local_value;
   27910             :         exc_info->exc_traceback = local_tb;
   27911             :       #endif
   27912             :     }
   27913             :     #else
   27914             :     tmp_type = tstate->exc_type;
   27915             :     tmp_value = tstate->exc_value;
   27916             :     tmp_tb = tstate->exc_traceback;
   27917             :     tstate->exc_type = local_type;
   27918             :     tstate->exc_value = local_value;
   27919             :     tstate->exc_traceback = local_tb;
   27920             :     #endif
   27921           0 :     Py_XDECREF(tmp_type);
   27922           0 :     Py_XDECREF(tmp_value);
   27923           0 :     Py_XDECREF(tmp_tb);
   27924             : #else
   27925             :     PyErr_SetExcInfo(local_type, local_value, local_tb);
   27926             : #endif
   27927           0 :     return 0;
   27928           0 : bad:
   27929           0 :     *type = 0;
   27930           0 :     *value = 0;
   27931           0 :     *tb = 0;
   27932           0 :     Py_XDECREF(local_type);
   27933           0 :     Py_XDECREF(local_value);
   27934           0 :     Py_XDECREF(local_tb);
   27935           0 :     return -1;
   27936             : }
   27937             : 
   27938             : /* SwapException */
   27939             : #if CYTHON_FAST_THREAD_STATE
   27940           0 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   27941           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   27942             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   27943           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   27944           0 :     tmp_value = exc_info->exc_value;
   27945           0 :     exc_info->exc_value = *value;
   27946           0 :     if (tmp_value == NULL || tmp_value == Py_None) {
   27947           0 :         Py_XDECREF(tmp_value);
   27948           0 :         tmp_value = NULL;
   27949           0 :         tmp_type = NULL;
   27950           0 :         tmp_tb = NULL;
   27951             :     } else {
   27952           0 :         tmp_type = (PyObject*) Py_TYPE(tmp_value);
   27953           0 :         Py_INCREF(tmp_type);
   27954             :         #if CYTHON_COMPILING_IN_CPYTHON
   27955           0 :         tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
   27956           0 :         Py_XINCREF(tmp_tb);
   27957             :         #else
   27958             :         tmp_tb = PyException_GetTraceback(tmp_value);
   27959             :         #endif
   27960             :     }
   27961             :   #elif CYTHON_USE_EXC_INFO_STACK
   27962             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   27963             :     tmp_type = exc_info->exc_type;
   27964             :     tmp_value = exc_info->exc_value;
   27965             :     tmp_tb = exc_info->exc_traceback;
   27966             :     exc_info->exc_type = *type;
   27967             :     exc_info->exc_value = *value;
   27968             :     exc_info->exc_traceback = *tb;
   27969             :   #else
   27970             :     tmp_type = tstate->exc_type;
   27971             :     tmp_value = tstate->exc_value;
   27972             :     tmp_tb = tstate->exc_traceback;
   27973             :     tstate->exc_type = *type;
   27974             :     tstate->exc_value = *value;
   27975             :     tstate->exc_traceback = *tb;
   27976             :   #endif
   27977           0 :     *type = tmp_type;
   27978           0 :     *value = tmp_value;
   27979           0 :     *tb = tmp_tb;
   27980           0 : }
   27981             : #else
   27982             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
   27983             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   27984             :     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
   27985             :     PyErr_SetExcInfo(*type, *value, *tb);
   27986             :     *type = tmp_type;
   27987             :     *value = tmp_value;
   27988             :     *tb = tmp_tb;
   27989             : }
   27990             : #endif
   27991             : 
   27992             : /* Import */
   27993           3 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
   27994           3 :     PyObject *module = 0;
   27995           3 :     PyObject *empty_dict = 0;
   27996           3 :     PyObject *empty_list = 0;
   27997             :     #if PY_MAJOR_VERSION < 3
   27998             :     PyObject *py_import;
   27999             :     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
   28000             :     if (unlikely(!py_import))
   28001             :         goto bad;
   28002             :     if (!from_list) {
   28003             :         empty_list = PyList_New(0);
   28004             :         if (unlikely(!empty_list))
   28005             :             goto bad;
   28006             :         from_list = empty_list;
   28007             :     }
   28008             :     #endif
   28009           3 :     empty_dict = PyDict_New();
   28010           3 :     if (unlikely(!empty_dict))
   28011           0 :         goto bad;
   28012             :     {
   28013             :         #if PY_MAJOR_VERSION >= 3
   28014           3 :         if (level == -1) {
   28015           0 :             if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
   28016           0 :                 module = PyImport_ImportModuleLevelObject(
   28017           0 :                     name, __pyx_d, empty_dict, from_list, 1);
   28018           0 :                 if (unlikely(!module)) {
   28019           0 :                     if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
   28020           0 :                         goto bad;
   28021           0 :                     PyErr_Clear();
   28022             :                 }
   28023             :             }
   28024           0 :             level = 0;
   28025             :         }
   28026             :         #endif
   28027           0 :         if (!module) {
   28028             :             #if PY_MAJOR_VERSION < 3
   28029             :             PyObject *py_level = PyInt_FromLong(level);
   28030             :             if (unlikely(!py_level))
   28031             :                 goto bad;
   28032             :             module = PyObject_CallFunctionObjArgs(py_import,
   28033             :                 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
   28034             :             Py_DECREF(py_level);
   28035             :             #else
   28036           3 :             module = PyImport_ImportModuleLevelObject(
   28037           3 :                 name, __pyx_d, empty_dict, from_list, level);
   28038             :             #endif
   28039             :         }
   28040             :     }
   28041           3 : bad:
   28042           3 :     Py_XDECREF(empty_dict);
   28043           3 :     Py_XDECREF(empty_list);
   28044             :     #if PY_MAJOR_VERSION < 3
   28045             :     Py_XDECREF(py_import);
   28046             :     #endif
   28047           3 :     return module;
   28048             : }
   28049             : 
   28050             : /* ImportDottedModule */
   28051             : #if PY_MAJOR_VERSION >= 3
   28052           0 : static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
   28053           0 :     PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
   28054           0 :     if (unlikely(PyErr_Occurred())) {
   28055           0 :         PyErr_Clear();
   28056             :     }
   28057           0 :     if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
   28058             :         partial_name = name;
   28059             :     } else {
   28060           0 :         slice = PySequence_GetSlice(parts_tuple, 0, count);
   28061           0 :         if (unlikely(!slice))
   28062           0 :             goto bad;
   28063           0 :         sep = PyUnicode_FromStringAndSize(".", 1);
   28064           0 :         if (unlikely(!sep))
   28065           0 :             goto bad;
   28066           0 :         partial_name = PyUnicode_Join(sep, slice);
   28067             :     }
   28068           0 :     PyErr_Format(
   28069             : #if PY_MAJOR_VERSION < 3
   28070             :         PyExc_ImportError,
   28071             :         "No module named '%s'", PyString_AS_STRING(partial_name));
   28072             : #else
   28073             : #if PY_VERSION_HEX >= 0x030600B1
   28074             :         PyExc_ModuleNotFoundError,
   28075             : #else
   28076             :         PyExc_ImportError,
   28077             : #endif
   28078             :         "No module named '%U'", partial_name);
   28079             : #endif
   28080           0 : bad:
   28081           0 :     Py_XDECREF(sep);
   28082           0 :     Py_XDECREF(slice);
   28083           0 :     Py_XDECREF(partial_name);
   28084           0 :     return NULL;
   28085             : }
   28086             : #endif
   28087             : #if PY_MAJOR_VERSION >= 3
   28088           3 : static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
   28089           3 :     PyObject *imported_module;
   28090             : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   28091             :     PyObject *modules = PyImport_GetModuleDict();
   28092             :     if (unlikely(!modules))
   28093             :         return NULL;
   28094             :     imported_module = __Pyx_PyDict_GetItemStr(modules, name);
   28095             :     Py_XINCREF(imported_module);
   28096             : #else
   28097           6 :     imported_module = PyImport_GetModule(name);
   28098             : #endif
   28099           3 :     return imported_module;
   28100             : }
   28101             : #endif
   28102             : #if PY_MAJOR_VERSION >= 3
   28103           0 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
   28104           0 :     Py_ssize_t i, nparts;
   28105           0 :     nparts = PyTuple_GET_SIZE(parts_tuple);
   28106           0 :     for (i=1; i < nparts && module; i++) {
   28107           0 :         PyObject *part, *submodule;
   28108             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   28109           0 :         part = PyTuple_GET_ITEM(parts_tuple, i);
   28110             : #else
   28111             :         part = PySequence_ITEM(parts_tuple, i);
   28112             : #endif
   28113           0 :         submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
   28114             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   28115             :         Py_DECREF(part);
   28116             : #endif
   28117           0 :         Py_DECREF(module);
   28118           0 :         module = submodule;
   28119             :     }
   28120           0 :     if (unlikely(!module)) {
   28121           0 :         return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
   28122             :     }
   28123             :     return module;
   28124             : }
   28125             : #endif
   28126           0 : static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   28127             : #if PY_MAJOR_VERSION < 3
   28128             :     PyObject *module, *from_list, *star = __pyx_n_s__3;
   28129             :     CYTHON_UNUSED_VAR(parts_tuple);
   28130             :     from_list = PyList_New(1);
   28131             :     if (unlikely(!from_list))
   28132             :         return NULL;
   28133             :     Py_INCREF(star);
   28134             :     PyList_SET_ITEM(from_list, 0, star);
   28135             :     module = __Pyx_Import(name, from_list, 0);
   28136             :     Py_DECREF(from_list);
   28137             :     return module;
   28138             : #else
   28139           0 :     PyObject *imported_module;
   28140           0 :     PyObject *module = __Pyx_Import(name, NULL, 0);
   28141           0 :     if (!parts_tuple || unlikely(!module))
   28142             :         return module;
   28143           0 :     imported_module = __Pyx__ImportDottedModule_Lookup(name);
   28144           0 :     if (likely(imported_module)) {
   28145           0 :         Py_DECREF(module);
   28146           0 :         return imported_module;
   28147             :     }
   28148           0 :     PyErr_Clear();
   28149           0 :     return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
   28150             : #endif
   28151             : }
   28152           3 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   28153             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
   28154           3 :     PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
   28155           3 :     if (likely(module)) {
   28156           3 :         PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
   28157           3 :         if (likely(spec)) {
   28158           3 :             PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
   28159           3 :             if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
   28160           3 :                 Py_DECREF(spec);
   28161             :                 spec = NULL;
   28162             :             }
   28163           3 :             Py_XDECREF(unsafe);
   28164             :         }
   28165           3 :         if (likely(!spec)) {
   28166           3 :             PyErr_Clear();
   28167           3 :             return module;
   28168             :         }
   28169           0 :         Py_DECREF(spec);
   28170           0 :         Py_DECREF(module);
   28171           0 :     } else if (PyErr_Occurred()) {
   28172           0 :         PyErr_Clear();
   28173             :     }
   28174             : #endif
   28175           0 :     return __Pyx__ImportDottedModule(name, parts_tuple);
   28176             : }
   28177             : 
   28178             : /* FastTypeChecks */
   28179             : #if CYTHON_COMPILING_IN_CPYTHON
   28180             : static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
   28181           0 :     while (a) {
   28182           0 :         a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
   28183           0 :         if (a == b)
   28184             :             return 1;
   28185             :     }
   28186           0 :     return b == &PyBaseObject_Type;
   28187             : }
   28188         772 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
   28189         772 :     PyObject *mro;
   28190         772 :     if (a == b) return 1;
   28191         772 :     mro = a->tp_mro;
   28192         772 :     if (likely(mro)) {
   28193         772 :         Py_ssize_t i, n;
   28194         772 :         n = PyTuple_GET_SIZE(mro);
   28195        2316 :         for (i = 0; i < n; i++) {
   28196        1544 :             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
   28197             :                 return 1;
   28198             :         }
   28199             :         return 0;
   28200             :     }
   28201         772 :     return __Pyx_InBases(a, b);
   28202             : }
   28203        2927 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
   28204        2927 :     PyObject *mro;
   28205        2927 :     if (cls == a || cls == b) return 1;
   28206         332 :     mro = cls->tp_mro;
   28207         332 :     if (likely(mro)) {
   28208         332 :         Py_ssize_t i, n;
   28209         332 :         n = PyTuple_GET_SIZE(mro);
   28210         996 :         for (i = 0; i < n; i++) {
   28211         664 :             PyObject *base = PyTuple_GET_ITEM(mro, i);
   28212         664 :             if (base == (PyObject *)a || base == (PyObject *)b)
   28213             :                 return 1;
   28214             :         }
   28215             :         return 0;
   28216             :     }
   28217           0 :     return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
   28218             : }
   28219             : #if PY_MAJOR_VERSION == 2
   28220             : static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
   28221             :     PyObject *exception, *value, *tb;
   28222             :     int res;
   28223             :     __Pyx_PyThreadState_declare
   28224             :     __Pyx_PyThreadState_assign
   28225             :     __Pyx_ErrFetch(&exception, &value, &tb);
   28226             :     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
   28227             :     if (unlikely(res == -1)) {
   28228             :         PyErr_WriteUnraisable(err);
   28229             :         res = 0;
   28230             :     }
   28231             :     if (!res) {
   28232             :         res = PyObject_IsSubclass(err, exc_type2);
   28233             :         if (unlikely(res == -1)) {
   28234             :             PyErr_WriteUnraisable(err);
   28235             :             res = 0;
   28236             :         }
   28237             :     }
   28238             :     __Pyx_ErrRestore(exception, value, tb);
   28239             :     return res;
   28240             : }
   28241             : #else
   28242           0 : static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
   28243           0 :     if (exc_type1) {
   28244             :         return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
   28245             :     } else {
   28246           0 :         return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
   28247             :     }
   28248             : }
   28249             : #endif
   28250           0 : static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   28251           0 :     Py_ssize_t i, n;
   28252           0 :     assert(PyExceptionClass_Check(exc_type));
   28253           0 :     n = PyTuple_GET_SIZE(tuple);
   28254             : #if PY_MAJOR_VERSION >= 3
   28255           0 :     for (i=0; i<n; i++) {
   28256           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   28257             :     }
   28258             : #endif
   28259           0 :     for (i=0; i<n; i++) {
   28260           0 :         PyObject *t = PyTuple_GET_ITEM(tuple, i);
   28261             :         #if PY_MAJOR_VERSION < 3
   28262             :         if (likely(exc_type == t)) return 1;
   28263             :         #endif
   28264           0 :         if (likely(PyExceptionClass_Check(t))) {
   28265           0 :             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
   28266             :         } else {
   28267           0 :         }
   28268             :     }
   28269             :     return 0;
   28270             : }
   28271           0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
   28272           0 :     if (likely(err == exc_type)) return 1;
   28273           0 :     if (likely(PyExceptionClass_Check(err))) {
   28274           0 :         if (likely(PyExceptionClass_Check(exc_type))) {
   28275           0 :             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
   28276           0 :         } else if (likely(PyTuple_Check(exc_type))) {
   28277           0 :             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
   28278             :         } else {
   28279           0 :         }
   28280             :     }
   28281           0 :     return PyErr_GivenExceptionMatches(err, exc_type);
   28282             : }
   28283             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
   28284             :     assert(PyExceptionClass_Check(exc_type1));
   28285             :     assert(PyExceptionClass_Check(exc_type2));
   28286             :     if (likely(err == exc_type1 || err == exc_type2)) return 1;
   28287             :     if (likely(PyExceptionClass_Check(err))) {
   28288             :         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
   28289             :     }
   28290             :     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
   28291             : }
   28292             : #endif
   28293             : 
   28294             : /* PySequenceMultiply */
   28295           0 : static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
   28296           0 :     PyObject *result, *pymul = PyInt_FromSsize_t(mul);
   28297           0 :     if (unlikely(!pymul))
   28298             :         return NULL;
   28299           0 :     result = PyNumber_Multiply(seq, pymul);
   28300           0 :     Py_DECREF(pymul);
   28301             :     return result;
   28302             : }
   28303           0 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
   28304             : #if CYTHON_USE_TYPE_SLOTS
   28305           0 :     PyTypeObject *type = Py_TYPE(seq);
   28306           0 :     if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
   28307           0 :         return type->tp_as_sequence->sq_repeat(seq, mul);
   28308             :     } else
   28309             : #endif
   28310             :     {
   28311           0 :         return __Pyx_PySequence_Multiply_Generic(seq, mul);
   28312             :     }
   28313             : }
   28314             : 
   28315             : /* SetItemInt */
   28316           0 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
   28317           0 :     int r;
   28318           0 :     if (unlikely(!j)) return -1;
   28319           0 :     r = PyObject_SetItem(o, j, v);
   28320           0 :     Py_DECREF(j);
   28321             :     return r;
   28322             : }
   28323           0 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
   28324             :                                                CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
   28325             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   28326           0 :     if (is_list || PyList_CheckExact(o)) {
   28327           0 :         Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
   28328           0 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
   28329           0 :             PyObject* old = PyList_GET_ITEM(o, n);
   28330           0 :             Py_INCREF(v);
   28331           0 :             PyList_SET_ITEM(o, n, v);
   28332           0 :             Py_DECREF(old);
   28333           0 :             return 1;
   28334             :         }
   28335             :     } else {
   28336           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   28337           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   28338           0 :         if (mm && mm->mp_ass_subscript) {
   28339           0 :             int r;
   28340           0 :             PyObject *key = PyInt_FromSsize_t(i);
   28341           0 :             if (unlikely(!key)) return -1;
   28342           0 :             r = mm->mp_ass_subscript(o, key, v);
   28343           0 :             Py_DECREF(key);
   28344           0 :             return r;
   28345             :         }
   28346           0 :         if (likely(sm && sm->sq_ass_item)) {
   28347           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   28348           0 :                 Py_ssize_t l = sm->sq_length(o);
   28349           0 :                 if (likely(l >= 0)) {
   28350           0 :                     i += l;
   28351             :                 } else {
   28352           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   28353             :                         return -1;
   28354           0 :                     PyErr_Clear();
   28355             :                 }
   28356             :             }
   28357           0 :             return sm->sq_ass_item(o, i, v);
   28358             :         }
   28359             :     }
   28360             : #else
   28361             :     if (is_list || !PyMapping_Check(o))
   28362             :     {
   28363             :         return PySequence_SetItem(o, i, v);
   28364             :     }
   28365             : #endif
   28366           0 :     return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
   28367             : }
   28368             : 
   28369             : /* RaiseUnboundLocalError */
   28370           0 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
   28371           0 :     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
   28372             : }
   28373             : 
   28374             : /* DivInt[long] */
   28375           0 : static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
   28376           0 :     long q = a / b;
   28377           0 :     long r = a - q*b;
   28378           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   28379           0 :     return q;
   28380             : }
   28381             : 
   28382             : /* ImportFrom */
   28383           3 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
   28384           3 :     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
   28385           3 :     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   28386           0 :         const char* module_name_str = 0;
   28387           0 :         PyObject* module_name = 0;
   28388           0 :         PyObject* module_dot = 0;
   28389           0 :         PyObject* full_name = 0;
   28390           0 :         PyErr_Clear();
   28391           0 :         module_name_str = PyModule_GetName(module);
   28392           0 :         if (unlikely(!module_name_str)) { goto modbad; }
   28393           0 :         module_name = PyUnicode_FromString(module_name_str);
   28394           0 :         if (unlikely(!module_name)) { goto modbad; }
   28395           0 :         module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2);
   28396           0 :         if (unlikely(!module_dot)) { goto modbad; }
   28397           0 :         full_name = PyUnicode_Concat(module_dot, name);
   28398           0 :         if (unlikely(!full_name)) { goto modbad; }
   28399             :         #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   28400             :         {
   28401             :             PyObject *modules = PyImport_GetModuleDict();
   28402             :             if (unlikely(!modules))
   28403             :                 goto modbad;
   28404             :             value = PyObject_GetItem(modules, full_name);
   28405             :         }
   28406             :         #else
   28407           0 :         value = PyImport_GetModule(full_name);
   28408             :         #endif
   28409           0 :       modbad:
   28410           0 :         Py_XDECREF(full_name);
   28411           0 :         Py_XDECREF(module_dot);
   28412           0 :         Py_XDECREF(module_name);
   28413             :     }
   28414           3 :     if (unlikely(!value)) {
   28415           0 :         PyErr_Format(PyExc_ImportError,
   28416             :         #if PY_MAJOR_VERSION < 3
   28417             :             "cannot import name %.230s", PyString_AS_STRING(name));
   28418             :         #else
   28419             :             "cannot import name %S", name);
   28420             :         #endif
   28421             :     }
   28422           3 :     return value;
   28423             : }
   28424             : 
   28425             : /* HasAttr */
   28426           0 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
   28427           0 :     PyObject *r;
   28428           0 :     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
   28429           0 :         PyErr_SetString(PyExc_TypeError,
   28430             :                         "hasattr(): attribute name must be string");
   28431           0 :         return -1;
   28432             :     }
   28433           0 :     r = __Pyx_GetAttr(o, n);
   28434           0 :     if (!r) {
   28435           0 :         PyErr_Clear();
   28436           0 :         return 0;
   28437             :     } else {
   28438           0 :         Py_DECREF(r);
   28439           0 :         return 1;
   28440             :     }
   28441             : }
   28442             : 
   28443             : /* PyObjectSetAttrStr */
   28444             : #if CYTHON_USE_TYPE_SLOTS
   28445        4669 : static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
   28446        4669 :     PyTypeObject* tp = Py_TYPE(obj);
   28447        4669 :     if (likely(tp->tp_setattro))
   28448        4669 :         return tp->tp_setattro(obj, attr_name, value);
   28449             : #if PY_MAJOR_VERSION < 3
   28450             :     if (likely(tp->tp_setattr))
   28451             :         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
   28452             : #endif
   28453           0 :     return PyObject_SetAttr(obj, attr_name, value);
   28454             : }
   28455             : #endif
   28456             : 
   28457             : /* PyIntBinop */
   28458             : #if !CYTHON_COMPILING_IN_PYPY
   28459         208 : static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
   28460         208 :     CYTHON_MAYBE_UNUSED_VAR(intval);
   28461         208 :     CYTHON_MAYBE_UNUSED_VAR(inplace);
   28462         208 :     CYTHON_UNUSED_VAR(zerodivision_check);
   28463             :     #if PY_MAJOR_VERSION < 3
   28464             :     if (likely(PyInt_CheckExact(op2))) {
   28465             :         const long a = intval;
   28466             :         long b = PyInt_AS_LONG(op2);
   28467             :         
   28468             : #ifdef HAVE_LONG_LONG
   28469             :             if (sizeof(PY_LONG_LONG) > sizeof(long)) {
   28470             :                 PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
   28471             :                 return (result >= LONG_MIN && result <= LONG_MAX) ?
   28472             :                     PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
   28473             :             }
   28474             : #endif
   28475             : #if CYTHON_USE_TYPE_SLOTS
   28476             :             return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
   28477             : #else
   28478             :             return PyNumber_Multiply(op1, op2);
   28479             : #endif
   28480             :     }
   28481             :     #endif
   28482             :     #if CYTHON_USE_PYLONG_INTERNALS
   28483         208 :     if (likely(PyLong_CheckExact(op2))) {
   28484         208 :         const long a = intval;
   28485         208 :         long b, x;
   28486             : #ifdef HAVE_LONG_LONG
   28487         208 :         const PY_LONG_LONG lla = intval;
   28488         208 :         PY_LONG_LONG llb, llx;
   28489             : #endif
   28490         208 :         if (unlikely(__Pyx_PyLong_IsZero(op2))) {
   28491           0 :             return __Pyx_NewRef(op2);
   28492             :         }
   28493         208 :         if (likely(__Pyx_PyLong_IsCompact(op2))) {
   28494         208 :             b = __Pyx_PyLong_CompactValue(op2);
   28495             :         } else {
   28496           0 :             const digit* digits = __Pyx_PyLong_Digits(op2);
   28497           0 :             const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
   28498           0 :             switch (size) {
   28499             :                 case -2:
   28500             :                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
   28501             :                         b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28502             :                         break;
   28503             :                     #ifdef HAVE_LONG_LONG
   28504             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
   28505             :                         llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28506             :                         goto long_long;
   28507             :                     #endif
   28508             :                     }
   28509             :                     CYTHON_FALLTHROUGH;
   28510             :                 case 2:
   28511             :                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
   28512             :                         b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28513             :                         break;
   28514             :                     #ifdef HAVE_LONG_LONG
   28515             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
   28516             :                         llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28517             :                         goto long_long;
   28518             :                     #endif
   28519             :                     }
   28520             :                     CYTHON_FALLTHROUGH;
   28521             :                 case -3:
   28522             :                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
   28523             :                         b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28524             :                         break;
   28525             :                     #ifdef HAVE_LONG_LONG
   28526             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
   28527             :                         llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28528             :                         goto long_long;
   28529             :                     #endif
   28530             :                     }
   28531             :                     CYTHON_FALLTHROUGH;
   28532             :                 case 3:
   28533             :                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
   28534             :                         b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28535             :                         break;
   28536             :                     #ifdef HAVE_LONG_LONG
   28537             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
   28538             :                         llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28539             :                         goto long_long;
   28540             :                     #endif
   28541             :                     }
   28542             :                     CYTHON_FALLTHROUGH;
   28543             :                 case -4:
   28544             :                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
   28545             :                         b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28546             :                         break;
   28547             :                     #ifdef HAVE_LONG_LONG
   28548             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
   28549             :                         llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28550             :                         goto long_long;
   28551             :                     #endif
   28552             :                     }
   28553           0 :                     CYTHON_FALLTHROUGH;
   28554             :                 case 4:
   28555           0 :                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
   28556             :                         b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28557             :                         break;
   28558             :                     #ifdef HAVE_LONG_LONG
   28559           0 :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
   28560             :                         llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28561             :                         goto long_long;
   28562             :                     #endif
   28563             :                     }
   28564           0 :                     CYTHON_FALLTHROUGH;
   28565           0 :                 default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
   28566             :             }
   28567             :         }
   28568         208 :                 CYTHON_UNUSED_VAR(a);
   28569         208 :                 CYTHON_UNUSED_VAR(b);
   28570             :                 #ifdef HAVE_LONG_LONG
   28571         208 :                 llb = b;
   28572         208 :                 goto long_long;
   28573             :                 #else
   28574             :                 return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
   28575             :                 #endif
   28576             :             return PyLong_FromLong(x);
   28577             : #ifdef HAVE_LONG_LONG
   28578         208 :         long_long:
   28579         208 :                 llx = lla * llb;
   28580         208 :             return PyLong_FromLongLong(llx);
   28581             : #endif
   28582             :         
   28583             :         
   28584             :     }
   28585             :     #endif
   28586           0 :     if (PyFloat_CheckExact(op2)) {
   28587           0 :         const long a = intval;
   28588             : #if CYTHON_COMPILING_IN_LIMITED_API
   28589             :         double b = __pyx_PyFloat_AsDouble(op2);
   28590             : #else
   28591           0 :         double b = PyFloat_AS_DOUBLE(op2);
   28592             : #endif
   28593           0 :             double result;
   28594             :             
   28595             :             PyFPE_START_PROTECT("multiply", return NULL)
   28596           0 :             result = ((double)a) * (double)b;
   28597             :             PyFPE_END_PROTECT(result)
   28598           0 :             return PyFloat_FromDouble(result);
   28599             :     }
   28600           0 :     return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
   28601             : }
   28602             : #endif
   28603             : 
   28604             : /* PyFloatBinop */
   28605             : #if !CYTHON_COMPILING_IN_PYPY
   28606         208 : static PyObject* __Pyx_PyFloat_TrueDivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
   28607         208 :     const double a = floatval;
   28608         208 :     double b, result;
   28609         208 :     CYTHON_UNUSED_VAR(inplace);
   28610         208 :     CYTHON_UNUSED_VAR(zerodivision_check);
   28611         208 :     if (likely(PyFloat_CheckExact(op2))) {
   28612             : #if CYTHON_COMPILING_IN_LIMITED_API
   28613             :         b = __pyx_PyFloat_AsDouble(op2);
   28614             : #else
   28615           0 :         b = PyFloat_AS_DOUBLE(op2);
   28616             : #endif
   28617           0 :         if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;}
   28618             :     } else
   28619             :     #if PY_MAJOR_VERSION < 3
   28620             :     if (likely(PyInt_CheckExact(op2))) {
   28621             :         b = (double) PyInt_AS_LONG(op2);
   28622             :         if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;}
   28623             :     } else
   28624             :     #endif
   28625         208 :     if (likely(PyLong_CheckExact(op2))) {
   28626             :         #if CYTHON_USE_PYLONG_INTERNALS
   28627         208 :         if (__Pyx_PyLong_IsZero(op2)) {
   28628           0 :             b = 0.0;
   28629           0 :             if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;}
   28630         208 :         } else if (__Pyx_PyLong_IsCompact(op2)) {
   28631         208 :             b = (double) __Pyx_PyLong_CompactValue(op2);
   28632             :         } else {
   28633           0 :             const digit* digits = __Pyx_PyLong_Digits(op2);
   28634           0 :             const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
   28635           0 :             switch (size) {
   28636             :                 case -2:
   28637             :                 case 2:
   28638           0 :                     if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
   28639           0 :                         b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28640           0 :                         if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
   28641           0 :                             if (size == -2)
   28642           0 :                                 b = -b;
   28643             :                             break;
   28644             :                         }
   28645             :                     }
   28646             :                     CYTHON_FALLTHROUGH;
   28647             :                 case -3:
   28648             :                 case 3:
   28649             :                     if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
   28650             :                         b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28651             :                         if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
   28652             :                             if (size == -3)
   28653             :                                 b = -b;
   28654             :                             break;
   28655             :                         }
   28656             :                     }
   28657             :                     CYTHON_FALLTHROUGH;
   28658             :                 case -4:
   28659             :                 case 4:
   28660             :                     if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
   28661             :                         b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28662             :                         if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
   28663             :                             if (size == -4)
   28664             :                                 b = -b;
   28665             :                             break;
   28666             :                         }
   28667             :                     }
   28668           0 :                     CYTHON_FALLTHROUGH;
   28669             :                 default:
   28670             :         #endif
   28671           0 :                     b = PyLong_AsDouble(op2);
   28672           0 :                     if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
   28673             :                     #if !CYTHON_USE_PYLONG_INTERNALS
   28674             :                     if (unlikely(zerodivision_check && ((b) == 0.0))) { PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); return NULL;}
   28675             :                     #endif
   28676             :         #if CYTHON_USE_PYLONG_INTERNALS
   28677             :             }
   28678             :         }
   28679             :         #endif
   28680             :     } else {
   28681           0 :         return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
   28682             :     }
   28683             :         PyFPE_START_PROTECT("divide", return NULL)
   28684         208 :         result = a / b;
   28685             :         PyFPE_END_PROTECT(result)
   28686         208 :         return PyFloat_FromDouble(result);
   28687             : }
   28688             : #endif
   28689             : 
   28690             : /* BufferIndexError */
   28691             : static void __Pyx_RaiseBufferIndexError(int axis) {
   28692             :   PyErr_Format(PyExc_IndexError,
   28693             :      "Out of bounds on buffer access (axis %d)", axis);
   28694             : }
   28695             : 
   28696             : /* PyIntBinop */
   28697             : #if !CYTHON_COMPILING_IN_PYPY
   28698         299 : static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
   28699         299 :     CYTHON_MAYBE_UNUSED_VAR(intval);
   28700         299 :     CYTHON_MAYBE_UNUSED_VAR(inplace);
   28701         299 :     CYTHON_UNUSED_VAR(zerodivision_check);
   28702             :     #if PY_MAJOR_VERSION < 3
   28703             :     if (likely(PyInt_CheckExact(op1))) {
   28704             :         const long b = intval;
   28705             :         long x;
   28706             :         long a = PyInt_AS_LONG(op1);
   28707             :         
   28708             :             x = (long)((unsigned long)a + (unsigned long)b);
   28709             :             if (likely((x^a) >= 0 || (x^b) >= 0))
   28710             :                 return PyInt_FromLong(x);
   28711             :             return PyLong_Type.tp_as_number->nb_add(op1, op2);
   28712             :     }
   28713             :     #endif
   28714             :     #if CYTHON_USE_PYLONG_INTERNALS
   28715         299 :     if (likely(PyLong_CheckExact(op1))) {
   28716         299 :         const long b = intval;
   28717         299 :         long a, x;
   28718             : #ifdef HAVE_LONG_LONG
   28719         299 :         const PY_LONG_LONG llb = intval;
   28720         299 :         PY_LONG_LONG lla, llx;
   28721             : #endif
   28722         299 :         if (unlikely(__Pyx_PyLong_IsZero(op1))) {
   28723           0 :             return __Pyx_NewRef(op2);
   28724             :         }
   28725         299 :         if (likely(__Pyx_PyLong_IsCompact(op1))) {
   28726         299 :             a = __Pyx_PyLong_CompactValue(op1);
   28727             :         } else {
   28728           0 :             const digit* digits = __Pyx_PyLong_Digits(op1);
   28729           0 :             const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
   28730           0 :             switch (size) {
   28731             :                 case -2:
   28732           0 :                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
   28733           0 :                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28734           0 :                         break;
   28735             :                     #ifdef HAVE_LONG_LONG
   28736             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
   28737             :                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28738             :                         goto long_long;
   28739             :                     #endif
   28740             :                     }
   28741           0 :                     CYTHON_FALLTHROUGH;
   28742             :                 case 2:
   28743           0 :                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
   28744           0 :                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28745           0 :                         break;
   28746             :                     #ifdef HAVE_LONG_LONG
   28747             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
   28748             :                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28749             :                         goto long_long;
   28750             :                     #endif
   28751             :                     }
   28752             :                     CYTHON_FALLTHROUGH;
   28753             :                 case -3:
   28754             :                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
   28755             :                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28756             :                         break;
   28757             :                     #ifdef HAVE_LONG_LONG
   28758             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
   28759             :                         lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28760             :                         goto long_long;
   28761             :                     #endif
   28762             :                     }
   28763             :                     CYTHON_FALLTHROUGH;
   28764             :                 case 3:
   28765             :                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
   28766             :                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28767             :                         break;
   28768             :                     #ifdef HAVE_LONG_LONG
   28769             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
   28770             :                         lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28771             :                         goto long_long;
   28772             :                     #endif
   28773             :                     }
   28774             :                     CYTHON_FALLTHROUGH;
   28775             :                 case -4:
   28776             :                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
   28777             :                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28778             :                         break;
   28779             :                     #ifdef HAVE_LONG_LONG
   28780             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
   28781             :                         lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28782             :                         goto long_long;
   28783             :                     #endif
   28784             :                     }
   28785             :                     CYTHON_FALLTHROUGH;
   28786             :                 case 4:
   28787             :                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
   28788             :                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
   28789             :                         break;
   28790             :                     #ifdef HAVE_LONG_LONG
   28791             :                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
   28792             :                         lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
   28793             :                         goto long_long;
   28794             :                     #endif
   28795             :                     }
   28796           0 :                     CYTHON_FALLTHROUGH;
   28797           0 :                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
   28798             :             }
   28799             :         }
   28800         299 :                 x = a + b;
   28801         299 :             return PyLong_FromLong(x);
   28802             : #ifdef HAVE_LONG_LONG
   28803             :         long_long:
   28804             :                 llx = lla + llb;
   28805             :             return PyLong_FromLongLong(llx);
   28806             : #endif
   28807             :         
   28808             :         
   28809             :     }
   28810             :     #endif
   28811           0 :     if (PyFloat_CheckExact(op1)) {
   28812           0 :         const long b = intval;
   28813             : #if CYTHON_COMPILING_IN_LIMITED_API
   28814             :         double a = __pyx_PyFloat_AsDouble(op1);
   28815             : #else
   28816           0 :         double a = PyFloat_AS_DOUBLE(op1);
   28817             : #endif
   28818           0 :             double result;
   28819             :             
   28820             :             PyFPE_START_PROTECT("add", return NULL)
   28821           0 :             result = ((double)a) + (double)b;
   28822             :             PyFPE_END_PROTECT(result)
   28823           0 :             return PyFloat_FromDouble(result);
   28824             :     }
   28825           0 :     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
   28826             : }
   28827             : #endif
   28828             : 
   28829             : /* PyObjectCallNoArg */
   28830         188 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
   28831         188 :     PyObject *arg[2] = {NULL, NULL};
   28832         188 :     return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   28833             : }
   28834             : 
   28835             : /* SliceObject */
   28836        1571 : static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
   28837             :         Py_ssize_t cstart, Py_ssize_t cstop,
   28838             :         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
   28839             :         int has_cstart, int has_cstop, int wraparound) {
   28840        1571 :     __Pyx_TypeName obj_type_name;
   28841             : #if CYTHON_USE_TYPE_SLOTS
   28842        1571 :     PyMappingMethods* mp;
   28843             : #if PY_MAJOR_VERSION < 3
   28844             :     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
   28845             :     if (likely(ms && ms->sq_ass_slice)) {
   28846             :         if (!has_cstart) {
   28847             :             if (_py_start && (*_py_start != Py_None)) {
   28848             :                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
   28849             :                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   28850             :             } else
   28851             :                 cstart = 0;
   28852             :         }
   28853             :         if (!has_cstop) {
   28854             :             if (_py_stop && (*_py_stop != Py_None)) {
   28855             :                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
   28856             :                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   28857             :             } else
   28858             :                 cstop = PY_SSIZE_T_MAX;
   28859             :         }
   28860             :         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
   28861             :             Py_ssize_t l = ms->sq_length(obj);
   28862             :             if (likely(l >= 0)) {
   28863             :                 if (cstop < 0) {
   28864             :                     cstop += l;
   28865             :                     if (cstop < 0) cstop = 0;
   28866             :                 }
   28867             :                 if (cstart < 0) {
   28868             :                     cstart += l;
   28869             :                     if (cstart < 0) cstart = 0;
   28870             :                 }
   28871             :             } else {
   28872             :                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   28873             :                     goto bad;
   28874             :                 PyErr_Clear();
   28875             :             }
   28876             :         }
   28877             :         return ms->sq_ass_slice(obj, cstart, cstop, value);
   28878             :     }
   28879             : #else
   28880        1571 :     CYTHON_UNUSED_VAR(wraparound);
   28881             : #endif
   28882        1571 :     mp = Py_TYPE(obj)->tp_as_mapping;
   28883        1571 :     if (likely(mp && mp->mp_ass_subscript))
   28884             : #else
   28885             :     CYTHON_UNUSED_VAR(wraparound);
   28886             : #endif
   28887             :     {
   28888        1571 :         int result;
   28889        1571 :         PyObject *py_slice, *py_start, *py_stop;
   28890        1571 :         if (_py_slice) {
   28891        1571 :             py_slice = *_py_slice;
   28892             :         } else {
   28893           0 :             PyObject* owned_start = NULL;
   28894           0 :             PyObject* owned_stop = NULL;
   28895           0 :             if (_py_start) {
   28896           0 :                 py_start = *_py_start;
   28897             :             } else {
   28898           0 :                 if (has_cstart) {
   28899           0 :                     owned_start = py_start = PyInt_FromSsize_t(cstart);
   28900           0 :                     if (unlikely(!py_start)) goto bad;
   28901             :                 } else
   28902             :                     py_start = Py_None;
   28903             :             }
   28904           0 :             if (_py_stop) {
   28905           0 :                 py_stop = *_py_stop;
   28906             :             } else {
   28907           0 :                 if (has_cstop) {
   28908           0 :                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
   28909           0 :                     if (unlikely(!py_stop)) {
   28910           0 :                         Py_XDECREF(owned_start);
   28911           0 :                         goto bad;
   28912             :                     }
   28913             :                 } else
   28914             :                     py_stop = Py_None;
   28915             :             }
   28916           0 :             py_slice = PySlice_New(py_start, py_stop, Py_None);
   28917           0 :             Py_XDECREF(owned_start);
   28918           0 :             Py_XDECREF(owned_stop);
   28919           0 :             if (unlikely(!py_slice)) goto bad;
   28920             :         }
   28921             : #if CYTHON_USE_TYPE_SLOTS
   28922        1571 :         result = mp->mp_ass_subscript(obj, py_slice, value);
   28923             : #else
   28924             :         result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
   28925             : #endif
   28926        1571 :         if (!_py_slice) {
   28927           0 :             Py_DECREF(py_slice);
   28928             :         }
   28929        1571 :         return result;
   28930             :     }
   28931           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   28932           0 :     PyErr_Format(PyExc_TypeError,
   28933             :         "'" __Pyx_FMT_TYPENAME "' object does not support slice %.10s",
   28934             :         obj_type_name, value ? "assignment" : "deletion");
   28935             :     __Pyx_DECREF_TypeName(obj_type_name);
   28936             : bad:
   28937             :     return -1;
   28938             : }
   28939             : 
   28940             : /* SliceObject */
   28941          91 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
   28942             :         Py_ssize_t cstart, Py_ssize_t cstop,
   28943             :         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
   28944             :         int has_cstart, int has_cstop, int wraparound) {
   28945          91 :     __Pyx_TypeName obj_type_name;
   28946             : #if CYTHON_USE_TYPE_SLOTS
   28947          91 :     PyMappingMethods* mp;
   28948             : #if PY_MAJOR_VERSION < 3
   28949             :     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
   28950             :     if (likely(ms && ms->sq_slice)) {
   28951             :         if (!has_cstart) {
   28952             :             if (_py_start && (*_py_start != Py_None)) {
   28953             :                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
   28954             :                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   28955             :             } else
   28956             :                 cstart = 0;
   28957             :         }
   28958             :         if (!has_cstop) {
   28959             :             if (_py_stop && (*_py_stop != Py_None)) {
   28960             :                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
   28961             :                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   28962             :             } else
   28963             :                 cstop = PY_SSIZE_T_MAX;
   28964             :         }
   28965             :         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
   28966             :             Py_ssize_t l = ms->sq_length(obj);
   28967             :             if (likely(l >= 0)) {
   28968             :                 if (cstop < 0) {
   28969             :                     cstop += l;
   28970             :                     if (cstop < 0) cstop = 0;
   28971             :                 }
   28972             :                 if (cstart < 0) {
   28973             :                     cstart += l;
   28974             :                     if (cstart < 0) cstart = 0;
   28975             :                 }
   28976             :             } else {
   28977             :                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   28978             :                     goto bad;
   28979             :                 PyErr_Clear();
   28980             :             }
   28981             :         }
   28982             :         return ms->sq_slice(obj, cstart, cstop);
   28983             :     }
   28984             : #else
   28985          91 :     CYTHON_UNUSED_VAR(wraparound);
   28986             : #endif
   28987          91 :     mp = Py_TYPE(obj)->tp_as_mapping;
   28988          91 :     if (likely(mp && mp->mp_subscript))
   28989             : #else
   28990             :     CYTHON_UNUSED_VAR(wraparound);
   28991             : #endif
   28992             :     {
   28993          91 :         PyObject* result;
   28994          91 :         PyObject *py_slice, *py_start, *py_stop;
   28995          91 :         if (_py_slice) {
   28996           0 :             py_slice = *_py_slice;
   28997             :         } else {
   28998          91 :             PyObject* owned_start = NULL;
   28999          91 :             PyObject* owned_stop = NULL;
   29000          91 :             if (_py_start) {
   29001          91 :                 py_start = *_py_start;
   29002             :             } else {
   29003           0 :                 if (has_cstart) {
   29004           0 :                     owned_start = py_start = PyInt_FromSsize_t(cstart);
   29005           0 :                     if (unlikely(!py_start)) goto bad;
   29006             :                 } else
   29007             :                     py_start = Py_None;
   29008             :             }
   29009          91 :             if (_py_stop) {
   29010          91 :                 py_stop = *_py_stop;
   29011             :             } else {
   29012           0 :                 if (has_cstop) {
   29013           0 :                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
   29014           0 :                     if (unlikely(!py_stop)) {
   29015           0 :                         Py_XDECREF(owned_start);
   29016           0 :                         goto bad;
   29017             :                     }
   29018             :                 } else
   29019             :                     py_stop = Py_None;
   29020             :             }
   29021          91 :             py_slice = PySlice_New(py_start, py_stop, Py_None);
   29022          91 :             Py_XDECREF(owned_start);
   29023          91 :             Py_XDECREF(owned_stop);
   29024          91 :             if (unlikely(!py_slice)) goto bad;
   29025             :         }
   29026             : #if CYTHON_USE_TYPE_SLOTS
   29027          91 :         result = mp->mp_subscript(obj, py_slice);
   29028             : #else
   29029             :         result = PyObject_GetItem(obj, py_slice);
   29030             : #endif
   29031          91 :         if (!_py_slice) {
   29032          91 :             Py_DECREF(py_slice);
   29033             :         }
   29034          91 :         return result;
   29035             :     }
   29036           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   29037           0 :     PyErr_Format(PyExc_TypeError,
   29038             :         "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
   29039             :     __Pyx_DECREF_TypeName(obj_type_name);
   29040             : bad:
   29041             :     return NULL;
   29042             : }
   29043             : 
   29044             : /* PyObject_GenericGetAttrNoDict */
   29045             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   29046             : static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
   29047             :     __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
   29048             :     PyErr_Format(PyExc_AttributeError,
   29049             : #if PY_MAJOR_VERSION >= 3
   29050             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   29051             :                  type_name, attr_name);
   29052             : #else
   29053             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   29054             :                  type_name, PyString_AS_STRING(attr_name));
   29055             : #endif
   29056             :     __Pyx_DECREF_TypeName(type_name);
   29057             :     return NULL;
   29058             : }
   29059             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
   29060             :     PyObject *descr;
   29061             :     PyTypeObject *tp = Py_TYPE(obj);
   29062             :     if (unlikely(!PyString_Check(attr_name))) {
   29063             :         return PyObject_GenericGetAttr(obj, attr_name);
   29064             :     }
   29065             :     assert(!tp->tp_dictoffset);
   29066             :     descr = _PyType_Lookup(tp, attr_name);
   29067             :     if (unlikely(!descr)) {
   29068             :         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
   29069             :     }
   29070             :     Py_INCREF(descr);
   29071             :     #if PY_MAJOR_VERSION < 3
   29072             :     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
   29073             :     #endif
   29074             :     {
   29075             :         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
   29076             :         if (unlikely(f)) {
   29077             :             PyObject *res = f(descr, obj, (PyObject *)tp);
   29078             :             Py_DECREF(descr);
   29079             :             return res;
   29080             :         }
   29081             :     }
   29082             :     return descr;
   29083             : }
   29084             : #endif
   29085             : 
   29086             : /* PyObject_GenericGetAttr */
   29087             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   29088             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
   29089             :     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
   29090             :         return PyObject_GenericGetAttr(obj, attr_name);
   29091             :     }
   29092             :     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
   29093             : }
   29094             : #endif
   29095             : 
   29096             : /* FixUpExtensionType */
   29097             : #if CYTHON_USE_TYPE_SPECS
   29098             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
   29099             : #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   29100             :     CYTHON_UNUSED_VAR(spec);
   29101             :     CYTHON_UNUSED_VAR(type);
   29102             : #else
   29103             :     const PyType_Slot *slot = spec->slots;
   29104             :     while (slot && slot->slot && slot->slot != Py_tp_members)
   29105             :         slot++;
   29106             :     if (slot && slot->slot == Py_tp_members) {
   29107             :         int changed = 0;
   29108             : #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
   29109             :         const
   29110             : #endif
   29111             :             PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
   29112             :         while (memb && memb->name) {
   29113             :             if (memb->name[0] == '_' && memb->name[1] == '_') {
   29114             : #if PY_VERSION_HEX < 0x030900b1
   29115             :                 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
   29116             :                     assert(memb->type == T_PYSSIZET);
   29117             :                     assert(memb->flags == READONLY);
   29118             :                     type->tp_weaklistoffset = memb->offset;
   29119             :                     changed = 1;
   29120             :                 }
   29121             :                 else if (strcmp(memb->name, "__dictoffset__") == 0) {
   29122             :                     assert(memb->type == T_PYSSIZET);
   29123             :                     assert(memb->flags == READONLY);
   29124             :                     type->tp_dictoffset = memb->offset;
   29125             :                     changed = 1;
   29126             :                 }
   29127             : #if CYTHON_METH_FASTCALL
   29128             :                 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
   29129             :                     assert(memb->type == T_PYSSIZET);
   29130             :                     assert(memb->flags == READONLY);
   29131             : #if PY_VERSION_HEX >= 0x030800b4
   29132             :                     type->tp_vectorcall_offset = memb->offset;
   29133             : #else
   29134             :                     type->tp_print = (printfunc) memb->offset;
   29135             : #endif
   29136             :                     changed = 1;
   29137             :                 }
   29138             : #endif
   29139             : #else
   29140             :                 if ((0));
   29141             : #endif
   29142             : #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
   29143             :                 else if (strcmp(memb->name, "__module__") == 0) {
   29144             :                     PyObject *descr;
   29145             :                     assert(memb->type == T_OBJECT);
   29146             :                     assert(memb->flags == 0 || memb->flags == READONLY);
   29147             :                     descr = PyDescr_NewMember(type, memb);
   29148             :                     if (unlikely(!descr))
   29149             :                         return -1;
   29150             :                     if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
   29151             :                         Py_DECREF(descr);
   29152             :                         return -1;
   29153             :                     }
   29154             :                     Py_DECREF(descr);
   29155             :                     changed = 1;
   29156             :                 }
   29157             : #endif
   29158             :             }
   29159             :             memb++;
   29160             :         }
   29161             :         if (changed)
   29162             :             PyType_Modified(type);
   29163             :     }
   29164             : #endif
   29165             :     return 0;
   29166             : }
   29167             : #endif
   29168             : 
   29169             : /* PyObjectGetMethod */
   29170             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
   29171             :     PyObject *attr;
   29172             : #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
   29173             :     __Pyx_TypeName type_name;
   29174             :     PyTypeObject *tp = Py_TYPE(obj);
   29175             :     PyObject *descr;
   29176             :     descrgetfunc f = NULL;
   29177             :     PyObject **dictptr, *dict;
   29178             :     int meth_found = 0;
   29179             :     assert (*method == NULL);
   29180             :     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
   29181             :         attr = __Pyx_PyObject_GetAttrStr(obj, name);
   29182             :         goto try_unpack;
   29183             :     }
   29184             :     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
   29185             :         return 0;
   29186             :     }
   29187             :     descr = _PyType_Lookup(tp, name);
   29188             :     if (likely(descr != NULL)) {
   29189             :         Py_INCREF(descr);
   29190             : #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
   29191             :         if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
   29192             : #elif PY_MAJOR_VERSION >= 3
   29193             :         #ifdef __Pyx_CyFunction_USED
   29194             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
   29195             :         #else
   29196             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
   29197             :         #endif
   29198             : #else
   29199             :         #ifdef __Pyx_CyFunction_USED
   29200             :         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
   29201             :         #else
   29202             :         if (likely(PyFunction_Check(descr)))
   29203             :         #endif
   29204             : #endif
   29205             :         {
   29206             :             meth_found = 1;
   29207             :         } else {
   29208             :             f = Py_TYPE(descr)->tp_descr_get;
   29209             :             if (f != NULL && PyDescr_IsData(descr)) {
   29210             :                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   29211             :                 Py_DECREF(descr);
   29212             :                 goto try_unpack;
   29213             :             }
   29214             :         }
   29215             :     }
   29216             :     dictptr = _PyObject_GetDictPtr(obj);
   29217             :     if (dictptr != NULL && (dict = *dictptr) != NULL) {
   29218             :         Py_INCREF(dict);
   29219             :         attr = __Pyx_PyDict_GetItemStr(dict, name);
   29220             :         if (attr != NULL) {
   29221             :             Py_INCREF(attr);
   29222             :             Py_DECREF(dict);
   29223             :             Py_XDECREF(descr);
   29224             :             goto try_unpack;
   29225             :         }
   29226             :         Py_DECREF(dict);
   29227             :     }
   29228             :     if (meth_found) {
   29229             :         *method = descr;
   29230             :         return 1;
   29231             :     }
   29232             :     if (f != NULL) {
   29233             :         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   29234             :         Py_DECREF(descr);
   29235             :         goto try_unpack;
   29236             :     }
   29237             :     if (likely(descr != NULL)) {
   29238             :         *method = descr;
   29239             :         return 0;
   29240             :     }
   29241             :     type_name = __Pyx_PyType_GetName(tp);
   29242             :     PyErr_Format(PyExc_AttributeError,
   29243             : #if PY_MAJOR_VERSION >= 3
   29244             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   29245             :                  type_name, name);
   29246             : #else
   29247             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   29248             :                  type_name, PyString_AS_STRING(name));
   29249             : #endif
   29250             :     __Pyx_DECREF_TypeName(type_name);
   29251             :     return 0;
   29252             : #else
   29253             :     attr = __Pyx_PyObject_GetAttrStr(obj, name);
   29254             :     goto try_unpack;
   29255             : #endif
   29256             : try_unpack:
   29257             : #if CYTHON_UNPACK_METHODS
   29258             :     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
   29259             :         PyObject *function = PyMethod_GET_FUNCTION(attr);
   29260             :         Py_INCREF(function);
   29261             :         Py_DECREF(attr);
   29262             :         *method = function;
   29263             :         return 1;
   29264             :     }
   29265             : #endif
   29266             :     *method = attr;
   29267             :     return 0;
   29268             : }
   29269             : 
   29270             : /* PyObjectCallMethod0 */
   29271             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
   29272             :     PyObject *method = NULL, *result = NULL;
   29273             :     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
   29274             :     if (likely(is_method)) {
   29275             :         result = __Pyx_PyObject_CallOneArg(method, obj);
   29276             :         Py_DECREF(method);
   29277             :         return result;
   29278             :     }
   29279             :     if (unlikely(!method)) goto bad;
   29280             :     result = __Pyx_PyObject_CallNoArg(method);
   29281             :     Py_DECREF(method);
   29282             : bad:
   29283             :     return result;
   29284             : }
   29285             : 
   29286             : /* ValidateBasesTuple */
   29287             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
   29288           0 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
   29289           0 :     Py_ssize_t i, n;
   29290             : #if CYTHON_ASSUME_SAFE_MACROS
   29291           0 :     n = PyTuple_GET_SIZE(bases);
   29292             : #else
   29293             :     n = PyTuple_Size(bases);
   29294             :     if (n < 0) return -1;
   29295             : #endif
   29296           0 :     for (i = 1; i < n; i++)
   29297             :     {
   29298             : #if CYTHON_AVOID_BORROWED_REFS
   29299             :         PyObject *b0 = PySequence_GetItem(bases, i);
   29300             :         if (!b0) return -1;
   29301             : #elif CYTHON_ASSUME_SAFE_MACROS
   29302           0 :         PyObject *b0 = PyTuple_GET_ITEM(bases, i);
   29303             : #else
   29304             :         PyObject *b0 = PyTuple_GetItem(bases, i);
   29305             :         if (!b0) return -1;
   29306             : #endif
   29307           0 :         PyTypeObject *b;
   29308             : #if PY_MAJOR_VERSION < 3
   29309             :         if (PyClass_Check(b0))
   29310             :         {
   29311             :             PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
   29312             :                          PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
   29313             : #if CYTHON_AVOID_BORROWED_REFS
   29314             :             Py_DECREF(b0);
   29315             : #endif
   29316             :             return -1;
   29317             :         }
   29318             : #endif
   29319           0 :         b = (PyTypeObject*) b0;
   29320           0 :         if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
   29321             :         {
   29322           0 :             __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   29323           0 :             PyErr_Format(PyExc_TypeError,
   29324             :                 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
   29325           0 :             __Pyx_DECREF_TypeName(b_name);
   29326             : #if CYTHON_AVOID_BORROWED_REFS
   29327             :             Py_DECREF(b0);
   29328             : #endif
   29329           0 :             return -1;
   29330             :         }
   29331           0 :         if (dictoffset == 0)
   29332             :         {
   29333           0 :             Py_ssize_t b_dictoffset = 0;
   29334             : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   29335           0 :             b_dictoffset = b->tp_dictoffset;
   29336             : #else
   29337             :             PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
   29338             :             if (!py_b_dictoffset) goto dictoffset_return;
   29339             :             b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
   29340             :             Py_DECREF(py_b_dictoffset);
   29341             :             if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
   29342             : #endif
   29343           0 :             if (b_dictoffset) {
   29344             :                 {
   29345           0 :                     __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   29346           0 :                     PyErr_Format(PyExc_TypeError,
   29347             :                         "extension type '%.200s' has no __dict__ slot, "
   29348             :                         "but base type '" __Pyx_FMT_TYPENAME "' has: "
   29349             :                         "either add 'cdef dict __dict__' to the extension type "
   29350             :                         "or add '__slots__ = [...]' to the base type",
   29351             :                         type_name, b_name);
   29352           0 :                     __Pyx_DECREF_TypeName(b_name);
   29353             :                 }
   29354             : #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
   29355             :               dictoffset_return:
   29356             : #endif
   29357             : #if CYTHON_AVOID_BORROWED_REFS
   29358             :                 Py_DECREF(b0);
   29359             : #endif
   29360           0 :                 return -1;
   29361             :             }
   29362             :         }
   29363             : #if CYTHON_AVOID_BORROWED_REFS
   29364             :         Py_DECREF(b0);
   29365             : #endif
   29366             :     }
   29367             :     return 0;
   29368             : }
   29369             : #endif
   29370             : 
   29371             : /* PyType_Ready */
   29372          12 : static int __Pyx_PyType_Ready(PyTypeObject *t) {
   29373             : #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
   29374             :     (void)__Pyx_PyObject_CallMethod0;
   29375             : #if CYTHON_USE_TYPE_SPECS
   29376             :     (void)__Pyx_validate_bases_tuple;
   29377             : #endif
   29378             :     return PyType_Ready(t);
   29379             : #else
   29380          12 :     int r;
   29381          12 :     PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
   29382          12 :     if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
   29383             :         return -1;
   29384             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   29385             :     {
   29386          12 :         int gc_was_enabled;
   29387             :     #if PY_VERSION_HEX >= 0x030A00b1
   29388          12 :         gc_was_enabled = PyGC_Disable();
   29389          12 :         (void)__Pyx_PyObject_CallMethod0;
   29390             :     #else
   29391             :         PyObject *ret, *py_status;
   29392             :         PyObject *gc = NULL;
   29393             :         #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
   29394             :         gc = PyImport_GetModule(__pyx_kp_u_gc);
   29395             :         #endif
   29396             :         if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
   29397             :         if (unlikely(!gc)) return -1;
   29398             :         py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
   29399             :         if (unlikely(!py_status)) {
   29400             :             Py_DECREF(gc);
   29401             :             return -1;
   29402             :         }
   29403             :         gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
   29404             :         Py_DECREF(py_status);
   29405             :         if (gc_was_enabled > 0) {
   29406             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
   29407             :             if (unlikely(!ret)) {
   29408             :                 Py_DECREF(gc);
   29409             :                 return -1;
   29410             :             }
   29411             :             Py_DECREF(ret);
   29412             :         } else if (unlikely(gc_was_enabled == -1)) {
   29413             :             Py_DECREF(gc);
   29414             :             return -1;
   29415             :         }
   29416             :     #endif
   29417          12 :         t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
   29418             : #if PY_VERSION_HEX >= 0x030A0000
   29419          12 :         t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
   29420             : #endif
   29421             : #else
   29422             :         (void)__Pyx_PyObject_CallMethod0;
   29423             : #endif
   29424          12 :     r = PyType_Ready(t);
   29425             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   29426          12 :         t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
   29427             :     #if PY_VERSION_HEX >= 0x030A00b1
   29428          12 :         if (gc_was_enabled)
   29429          12 :             PyGC_Enable();
   29430             :     #else
   29431             :         if (gc_was_enabled) {
   29432             :             PyObject *tp, *v, *tb;
   29433             :             PyErr_Fetch(&tp, &v, &tb);
   29434             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
   29435             :             if (likely(ret || r == -1)) {
   29436             :                 Py_XDECREF(ret);
   29437             :                 PyErr_Restore(tp, v, tb);
   29438             :             } else {
   29439             :                 Py_XDECREF(tp);
   29440             :                 Py_XDECREF(v);
   29441             :                 Py_XDECREF(tb);
   29442             :                 r = -1;
   29443             :             }
   29444             :         }
   29445             :         Py_DECREF(gc);
   29446             :     #endif
   29447             :     }
   29448             : #endif
   29449             :     return r;
   29450             : #endif
   29451             : }
   29452             : 
   29453             : /* SetVTable */
   29454           9 : static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
   29455           9 :     PyObject *ob = PyCapsule_New(vtable, 0, 0);
   29456           9 :     if (unlikely(!ob))
   29457           0 :         goto bad;
   29458             : #if CYTHON_COMPILING_IN_LIMITED_API
   29459             :     if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
   29460             : #else
   29461           9 :     if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
   29462             : #endif
   29463           0 :         goto bad;
   29464           9 :     Py_DECREF(ob);
   29465             :     return 0;
   29466           0 : bad:
   29467           0 :     Py_XDECREF(ob);
   29468           0 :     return -1;
   29469             : }
   29470             : 
   29471             : /* GetVTable */
   29472           3 : static void* __Pyx_GetVtable(PyTypeObject *type) {
   29473           3 :     void* ptr;
   29474             : #if CYTHON_COMPILING_IN_LIMITED_API
   29475             :     PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
   29476             : #else
   29477           3 :     PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
   29478             : #endif
   29479           3 :     if (!ob)
   29480           0 :         goto bad;
   29481           3 :     ptr = PyCapsule_GetPointer(ob, 0);
   29482           3 :     if (!ptr && !PyErr_Occurred())
   29483           0 :         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
   29484           3 :     Py_DECREF(ob);
   29485             :     return ptr;
   29486           0 : bad:
   29487           0 :     Py_XDECREF(ob);
   29488           0 :     return NULL;
   29489             : }
   29490             : 
   29491             : /* MergeVTables */
   29492             : #if !CYTHON_COMPILING_IN_LIMITED_API
   29493           9 : static int __Pyx_MergeVtables(PyTypeObject *type) {
   29494           9 :     int i;
   29495           9 :     void** base_vtables;
   29496           9 :     __Pyx_TypeName tp_base_name;
   29497           9 :     __Pyx_TypeName base_name;
   29498           9 :     void* unknown = (void*)-1;
   29499           9 :     PyObject* bases = type->tp_bases;
   29500           9 :     int base_depth = 0;
   29501             :     {
   29502           9 :         PyTypeObject* base = type->tp_base;
   29503          21 :         while (base) {
   29504          12 :             base_depth += 1;
   29505          12 :             base = base->tp_base;
   29506             :         }
   29507             :     }
   29508           9 :     base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
   29509           9 :     base_vtables[0] = unknown;
   29510           9 :     for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
   29511           0 :         void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
   29512           0 :         if (base_vtable != NULL) {
   29513           0 :             int j;
   29514           0 :             PyTypeObject* base = type->tp_base;
   29515           0 :             for (j = 0; j < base_depth; j++) {
   29516           0 :                 if (base_vtables[j] == unknown) {
   29517           0 :                     base_vtables[j] = __Pyx_GetVtable(base);
   29518           0 :                     base_vtables[j + 1] = unknown;
   29519             :                 }
   29520           0 :                 if (base_vtables[j] == base_vtable) {
   29521             :                     break;
   29522           0 :                 } else if (base_vtables[j] == NULL) {
   29523           0 :                     goto bad;
   29524             :                 }
   29525           0 :                 base = base->tp_base;
   29526             :             }
   29527             :         }
   29528             :     }
   29529           9 :     PyErr_Clear();
   29530           9 :     free(base_vtables);
   29531           9 :     return 0;
   29532           0 : bad:
   29533           0 :     tp_base_name = __Pyx_PyType_GetName(type->tp_base);
   29534           0 :     base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
   29535           0 :     PyErr_Format(PyExc_TypeError,
   29536             :         "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
   29537           0 :     __Pyx_DECREF_TypeName(tp_base_name);
   29538           0 :     __Pyx_DECREF_TypeName(base_name);
   29539           0 :     free(base_vtables);
   29540           0 :     return -1;
   29541             : }
   29542             : #endif
   29543             : 
   29544             : /* SetupReduce */
   29545             : #if !CYTHON_COMPILING_IN_LIMITED_API
   29546           6 : static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
   29547           6 :   int ret;
   29548           6 :   PyObject *name_attr;
   29549           6 :   name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
   29550           6 :   if (likely(name_attr)) {
   29551           6 :       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
   29552             :   } else {
   29553             :       ret = -1;
   29554             :   }
   29555           6 :   if (unlikely(ret < 0)) {
   29556           0 :       PyErr_Clear();
   29557           0 :       ret = 0;
   29558             :   }
   29559           6 :   Py_XDECREF(name_attr);
   29560           6 :   return ret;
   29561             : }
   29562          12 : static int __Pyx_setup_reduce(PyObject* type_obj) {
   29563          12 :     int ret = 0;
   29564          12 :     PyObject *object_reduce = NULL;
   29565          12 :     PyObject *object_getstate = NULL;
   29566          12 :     PyObject *object_reduce_ex = NULL;
   29567          12 :     PyObject *reduce = NULL;
   29568          12 :     PyObject *reduce_ex = NULL;
   29569          12 :     PyObject *reduce_cython = NULL;
   29570          12 :     PyObject *setstate = NULL;
   29571          12 :     PyObject *setstate_cython = NULL;
   29572          12 :     PyObject *getstate = NULL;
   29573             : #if CYTHON_USE_PYTYPE_LOOKUP
   29574          12 :     getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
   29575             : #else
   29576             :     getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
   29577             :     if (!getstate && PyErr_Occurred()) {
   29578             :         goto __PYX_BAD;
   29579             :     }
   29580             : #endif
   29581          12 :     if (getstate) {
   29582             : #if CYTHON_USE_PYTYPE_LOOKUP
   29583          12 :         object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
   29584             : #else
   29585             :         object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
   29586             :         if (!object_getstate && PyErr_Occurred()) {
   29587             :             goto __PYX_BAD;
   29588             :         }
   29589             : #endif
   29590          12 :         if (object_getstate != getstate) {
   29591           0 :             goto __PYX_GOOD;
   29592             :         }
   29593             :     }
   29594             : #if CYTHON_USE_PYTYPE_LOOKUP
   29595          12 :     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   29596             : #else
   29597             :     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   29598             : #endif
   29599          12 :     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
   29600          12 :     if (reduce_ex == object_reduce_ex) {
   29601             : #if CYTHON_USE_PYTYPE_LOOKUP
   29602          12 :         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   29603             : #else
   29604             :         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   29605             : #endif
   29606          12 :         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
   29607          12 :         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
   29608          12 :             reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
   29609          12 :             if (likely(reduce_cython)) {
   29610          12 :                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   29611          12 :                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   29612           0 :             } else if (reduce == object_reduce || PyErr_Occurred()) {
   29613           0 :                 goto __PYX_BAD;
   29614             :             }
   29615          12 :             setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
   29616          12 :             if (!setstate) PyErr_Clear();
   29617          12 :             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
   29618          12 :                 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
   29619          12 :                 if (likely(setstate_cython)) {
   29620          12 :                     ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   29621          12 :                     ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   29622           0 :                 } else if (!setstate || PyErr_Occurred()) {
   29623           0 :                     goto __PYX_BAD;
   29624             :                 }
   29625             :             }
   29626          12 :             PyType_Modified((PyTypeObject*)type_obj);
   29627             :         }
   29628             :     }
   29629          12 :     goto __PYX_GOOD;
   29630           0 : __PYX_BAD:
   29631           0 :     if (!PyErr_Occurred()) {
   29632           0 :         __Pyx_TypeName type_obj_name =
   29633             :             __Pyx_PyType_GetName((PyTypeObject*)type_obj);
   29634           0 :         PyErr_Format(PyExc_RuntimeError,
   29635             :             "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
   29636             :         __Pyx_DECREF_TypeName(type_obj_name);
   29637             :     }
   29638             :     ret = -1;
   29639          12 : __PYX_GOOD:
   29640             : #if !CYTHON_USE_PYTYPE_LOOKUP
   29641             :     Py_XDECREF(object_reduce);
   29642             :     Py_XDECREF(object_reduce_ex);
   29643             :     Py_XDECREF(object_getstate);
   29644             :     Py_XDECREF(getstate);
   29645             : #endif
   29646          12 :     Py_XDECREF(reduce);
   29647          12 :     Py_XDECREF(reduce_ex);
   29648          12 :     Py_XDECREF(reduce_cython);
   29649          12 :     Py_XDECREF(setstate);
   29650          12 :     Py_XDECREF(setstate_cython);
   29651          12 :     return ret;
   29652             : }
   29653             : #endif
   29654             : 
   29655             : /* TypeImport */
   29656             : #ifndef __PYX_HAVE_RT_ImportType_3_0_11
   29657             : #define __PYX_HAVE_RT_ImportType_3_0_11
   29658          51 : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
   29659             :     size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
   29660             : {
   29661          51 :     PyObject *result = 0;
   29662          51 :     char warning[200];
   29663          51 :     Py_ssize_t basicsize;
   29664          51 :     Py_ssize_t itemsize;
   29665             : #if CYTHON_COMPILING_IN_LIMITED_API
   29666             :     PyObject *py_basicsize;
   29667             :     PyObject *py_itemsize;
   29668             : #endif
   29669          51 :     result = PyObject_GetAttrString(module, class_name);
   29670          51 :     if (!result)
   29671           0 :         goto bad;
   29672          51 :     if (!PyType_Check(result)) {
   29673           0 :         PyErr_Format(PyExc_TypeError,
   29674             :             "%.200s.%.200s is not a type object",
   29675             :             module_name, class_name);
   29676           0 :         goto bad;
   29677             :     }
   29678             : #if !CYTHON_COMPILING_IN_LIMITED_API
   29679          51 :     basicsize = ((PyTypeObject *)result)->tp_basicsize;
   29680          51 :     itemsize = ((PyTypeObject *)result)->tp_itemsize;
   29681             : #else
   29682             :     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
   29683             :     if (!py_basicsize)
   29684             :         goto bad;
   29685             :     basicsize = PyLong_AsSsize_t(py_basicsize);
   29686             :     Py_DECREF(py_basicsize);
   29687             :     py_basicsize = 0;
   29688             :     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
   29689             :         goto bad;
   29690             :     py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
   29691             :     if (!py_itemsize)
   29692             :         goto bad;
   29693             :     itemsize = PyLong_AsSsize_t(py_itemsize);
   29694             :     Py_DECREF(py_itemsize);
   29695             :     py_itemsize = 0;
   29696             :     if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
   29697             :         goto bad;
   29698             : #endif
   29699          51 :     if (itemsize) {
   29700           3 :         if (size % alignment) {
   29701           0 :             alignment = size % alignment;
   29702             :         }
   29703           3 :         if (itemsize < (Py_ssize_t)alignment)
   29704             :             itemsize = (Py_ssize_t)alignment;
   29705             :     }
   29706          51 :     if ((size_t)(basicsize + itemsize) < size) {
   29707           0 :         PyErr_Format(PyExc_ValueError,
   29708             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   29709             :             "Expected %zd from C header, got %zd from PyObject",
   29710             :             module_name, class_name, size, basicsize+itemsize);
   29711           0 :         goto bad;
   29712             :     }
   29713          51 :     if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
   29714           0 :             ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
   29715           0 :         PyErr_Format(PyExc_ValueError,
   29716             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   29717             :             "Expected %zd from C header, got %zd-%zd from PyObject",
   29718             :             module_name, class_name, size, basicsize, basicsize+itemsize);
   29719           0 :         goto bad;
   29720             :     }
   29721          51 :     else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
   29722           0 :         PyOS_snprintf(warning, sizeof(warning),
   29723             :             "%s.%s size changed, may indicate binary incompatibility. "
   29724             :             "Expected %zd from C header, got %zd from PyObject",
   29725             :             module_name, class_name, size, basicsize);
   29726           0 :         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
   29727             :     }
   29728             :     return (PyTypeObject *)result;
   29729           0 : bad:
   29730           0 :     Py_XDECREF(result);
   29731           0 :     return NULL;
   29732             : }
   29733             : #endif
   29734             : 
   29735             : /* Py3UpdateBases */
   29736             : static PyObject*
   29737           3 : __Pyx_PEP560_update_bases(PyObject *bases)
   29738             : {
   29739           3 :     Py_ssize_t i, j, size_bases;
   29740           3 :     PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
   29741           3 :     size_bases = PyTuple_GET_SIZE(bases);
   29742           6 :     for (i = 0; i < size_bases; i++) {
   29743           3 :         base  = PyTuple_GET_ITEM(bases, i);
   29744           3 :         if (PyType_Check(base)) {
   29745           3 :             if (new_bases) {
   29746           0 :                 if (PyList_Append(new_bases, base) < 0) {
   29747           0 :                     goto error;
   29748             :                 }
   29749             :             }
   29750           3 :             continue;
   29751             :         }
   29752           0 :         meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
   29753           0 :         if (!meth && PyErr_Occurred()) {
   29754           0 :             goto error;
   29755             :         }
   29756           0 :         if (!meth) {
   29757           0 :             if (new_bases) {
   29758           0 :                 if (PyList_Append(new_bases, base) < 0) {
   29759           0 :                     goto error;
   29760             :                 }
   29761             :             }
   29762           0 :             continue;
   29763             :         }
   29764           0 :         new_base = __Pyx_PyObject_CallOneArg(meth, bases);
   29765           0 :         Py_DECREF(meth);
   29766           0 :         if (!new_base) {
   29767           0 :             goto error;
   29768             :         }
   29769           0 :         if (!PyTuple_Check(new_base)) {
   29770           0 :             PyErr_SetString(PyExc_TypeError,
   29771             :                             "__mro_entries__ must return a tuple");
   29772           0 :             Py_DECREF(new_base);
   29773           0 :             goto error;
   29774             :         }
   29775           0 :         if (!new_bases) {
   29776           0 :             if (!(new_bases = PyList_New(i))) {
   29777           0 :                 goto error;
   29778             :             }
   29779           0 :             for (j = 0; j < i; j++) {
   29780           0 :                 base = PyTuple_GET_ITEM(bases, j);
   29781           0 :                 PyList_SET_ITEM(new_bases, j, base);
   29782           0 :                 Py_INCREF(base);
   29783             :             }
   29784             :         }
   29785           0 :         j = PyList_GET_SIZE(new_bases);
   29786           0 :         if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
   29787           0 :             goto error;
   29788             :         }
   29789           3 :         Py_DECREF(new_base);
   29790             :     }
   29791           3 :     if (!new_bases) {
   29792           3 :         Py_INCREF(bases);
   29793           3 :         return bases;
   29794             :     }
   29795           0 :     result = PyList_AsTuple(new_bases);
   29796           0 :     Py_DECREF(new_bases);
   29797             :     return result;
   29798           0 : error:
   29799           0 :     Py_XDECREF(new_bases);
   29800           0 :     return NULL;
   29801             : }
   29802             : 
   29803             : /* CalculateMetaclass */
   29804           3 : static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
   29805           3 :     Py_ssize_t i, nbases;
   29806             : #if CYTHON_ASSUME_SAFE_MACROS
   29807           3 :     nbases = PyTuple_GET_SIZE(bases);
   29808             : #else
   29809             :     nbases = PyTuple_Size(bases);
   29810             :     if (nbases < 0) return NULL;
   29811             : #endif
   29812           6 :     for (i=0; i < nbases; i++) {
   29813           3 :         PyTypeObject *tmptype;
   29814             : #if CYTHON_ASSUME_SAFE_MACROS
   29815           3 :         PyObject *tmp = PyTuple_GET_ITEM(bases, i);
   29816             : #else
   29817             :         PyObject *tmp = PyTuple_GetItem(bases, i);
   29818             :         if (!tmp) return NULL;
   29819             : #endif
   29820           3 :         tmptype = Py_TYPE(tmp);
   29821             : #if PY_MAJOR_VERSION < 3
   29822             :         if (tmptype == &PyClass_Type)
   29823             :             continue;
   29824             : #endif
   29825           3 :         if (!metaclass) {
   29826           3 :             metaclass = tmptype;
   29827           3 :             continue;
   29828             :         }
   29829           0 :         if (PyType_IsSubtype(metaclass, tmptype))
   29830           0 :             continue;
   29831           0 :         if (PyType_IsSubtype(tmptype, metaclass)) {
   29832           0 :             metaclass = tmptype;
   29833           0 :             continue;
   29834             :         }
   29835           0 :         PyErr_SetString(PyExc_TypeError,
   29836             :                         "metaclass conflict: "
   29837             :                         "the metaclass of a derived class "
   29838             :                         "must be a (non-strict) subclass "
   29839             :                         "of the metaclasses of all its bases");
   29840           0 :         return NULL;
   29841             :     }
   29842           3 :     if (!metaclass) {
   29843             : #if PY_MAJOR_VERSION < 3
   29844             :         metaclass = &PyClass_Type;
   29845             : #else
   29846           0 :         metaclass = &PyType_Type;
   29847             : #endif
   29848             :     }
   29849           3 :     Py_INCREF((PyObject*) metaclass);
   29850             :     return (PyObject*) metaclass;
   29851             : }
   29852             : 
   29853             : /* FetchSharedCythonModule */
   29854           3 : static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
   29855           3 :     return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
   29856             : }
   29857             : 
   29858             : /* FetchCommonType */
   29859           3 : static int __Pyx_VerifyCachedType(PyObject *cached_type,
   29860             :                                const char *name,
   29861             :                                Py_ssize_t basicsize,
   29862             :                                Py_ssize_t expected_basicsize) {
   29863           3 :     if (!PyType_Check(cached_type)) {
   29864           0 :         PyErr_Format(PyExc_TypeError,
   29865             :             "Shared Cython type %.200s is not a type object", name);
   29866           0 :         return -1;
   29867             :     }
   29868           3 :     if (basicsize != expected_basicsize) {
   29869           0 :         PyErr_Format(PyExc_TypeError,
   29870             :             "Shared Cython type %.200s has the wrong size, try recompiling",
   29871             :             name);
   29872           0 :         return -1;
   29873             :     }
   29874             :     return 0;
   29875             : }
   29876             : #if !CYTHON_USE_TYPE_SPECS
   29877           3 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
   29878           3 :     PyObject* abi_module;
   29879           3 :     const char* object_name;
   29880           3 :     PyTypeObject *cached_type = NULL;
   29881           3 :     abi_module = __Pyx_FetchSharedCythonABIModule();
   29882           3 :     if (!abi_module) return NULL;
   29883           3 :     object_name = strrchr(type->tp_name, '.');
   29884           3 :     object_name = object_name ? object_name+1 : type->tp_name;
   29885           3 :     cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
   29886           3 :     if (cached_type) {
   29887           3 :         if (__Pyx_VerifyCachedType(
   29888             :               (PyObject *)cached_type,
   29889             :               object_name,
   29890             :               cached_type->tp_basicsize,
   29891             :               type->tp_basicsize) < 0) {
   29892           0 :             goto bad;
   29893             :         }
   29894           3 :         goto done;
   29895             :     }
   29896           0 :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   29897           0 :     PyErr_Clear();
   29898           0 :     if (PyType_Ready(type) < 0) goto bad;
   29899           0 :     if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
   29900           0 :         goto bad;
   29901           0 :     Py_INCREF(type);
   29902             :     cached_type = type;
   29903           3 : done:
   29904           3 :     Py_DECREF(abi_module);
   29905             :     return cached_type;
   29906           0 : bad:
   29907           0 :     Py_XDECREF(cached_type);
   29908           0 :     cached_type = NULL;
   29909           0 :     goto done;
   29910             : }
   29911             : #else
   29912             : static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
   29913             :     PyObject *abi_module, *cached_type = NULL;
   29914             :     const char* object_name = strrchr(spec->name, '.');
   29915             :     object_name = object_name ? object_name+1 : spec->name;
   29916             :     abi_module = __Pyx_FetchSharedCythonABIModule();
   29917             :     if (!abi_module) return NULL;
   29918             :     cached_type = PyObject_GetAttrString(abi_module, object_name);
   29919             :     if (cached_type) {
   29920             :         Py_ssize_t basicsize;
   29921             : #if CYTHON_COMPILING_IN_LIMITED_API
   29922             :         PyObject *py_basicsize;
   29923             :         py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
   29924             :         if (unlikely(!py_basicsize)) goto bad;
   29925             :         basicsize = PyLong_AsSsize_t(py_basicsize);
   29926             :         Py_DECREF(py_basicsize);
   29927             :         py_basicsize = 0;
   29928             :         if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   29929             : #else
   29930             :         basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
   29931             : #endif
   29932             :         if (__Pyx_VerifyCachedType(
   29933             :               cached_type,
   29934             :               object_name,
   29935             :               basicsize,
   29936             :               spec->basicsize) < 0) {
   29937             :             goto bad;
   29938             :         }
   29939             :         goto done;
   29940             :     }
   29941             :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   29942             :     PyErr_Clear();
   29943             :     CYTHON_UNUSED_VAR(module);
   29944             :     cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
   29945             :     if (unlikely(!cached_type)) goto bad;
   29946             :     if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
   29947             :     if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
   29948             : done:
   29949             :     Py_DECREF(abi_module);
   29950             :     assert(cached_type == NULL || PyType_Check(cached_type));
   29951             :     return (PyTypeObject *) cached_type;
   29952             : bad:
   29953             :     Py_XDECREF(cached_type);
   29954             :     cached_type = NULL;
   29955             :     goto done;
   29956             : }
   29957             : #endif
   29958             : 
   29959             : /* PyVectorcallFastCallDict */
   29960             : #if CYTHON_METH_FASTCALL
   29961           0 : static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   29962             : {
   29963           0 :     PyObject *res = NULL;
   29964           0 :     PyObject *kwnames;
   29965           0 :     PyObject **newargs;
   29966           0 :     PyObject **kwvalues;
   29967           0 :     Py_ssize_t i, pos;
   29968           0 :     size_t j;
   29969           0 :     PyObject *key, *value;
   29970           0 :     unsigned long keys_are_strings;
   29971           0 :     Py_ssize_t nkw = PyDict_GET_SIZE(kw);
   29972           0 :     newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
   29973           0 :     if (unlikely(newargs == NULL)) {
   29974           0 :         PyErr_NoMemory();
   29975           0 :         return NULL;
   29976             :     }
   29977           0 :     for (j = 0; j < nargs; j++) newargs[j] = args[j];
   29978           0 :     kwnames = PyTuple_New(nkw);
   29979           0 :     if (unlikely(kwnames == NULL)) {
   29980           0 :         PyMem_Free(newargs);
   29981           0 :         return NULL;
   29982             :     }
   29983           0 :     kwvalues = newargs + nargs;
   29984           0 :     pos = i = 0;
   29985           0 :     keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
   29986           0 :     while (PyDict_Next(kw, &pos, &key, &value)) {
   29987           0 :         keys_are_strings &= Py_TYPE(key)->tp_flags;
   29988           0 :         Py_INCREF(key);
   29989           0 :         Py_INCREF(value);
   29990           0 :         PyTuple_SET_ITEM(kwnames, i, key);
   29991           0 :         kwvalues[i] = value;
   29992           0 :         i++;
   29993             :     }
   29994           0 :     if (unlikely(!keys_are_strings)) {
   29995           0 :         PyErr_SetString(PyExc_TypeError, "keywords must be strings");
   29996           0 :         goto cleanup;
   29997             :     }
   29998           0 :     res = vc(func, newargs, nargs, kwnames);
   29999           0 : cleanup:
   30000           0 :     Py_DECREF(kwnames);
   30001           0 :     for (i = 0; i < nkw; i++)
   30002           0 :         Py_DECREF(kwvalues[i]);
   30003           0 :     PyMem_Free(newargs);
   30004           0 :     return res;
   30005             : }
   30006           0 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   30007             : {
   30008           0 :     if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
   30009           0 :         return vc(func, args, nargs, NULL);
   30010             :     }
   30011           0 :     return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
   30012             : }
   30013             : #endif
   30014             : 
   30015             : /* CythonFunctionShared */
   30016             : #if CYTHON_COMPILING_IN_LIMITED_API
   30017             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   30018             :     if (__Pyx_CyFunction_Check(func)) {
   30019             :         return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
   30020             :     } else if (PyCFunction_Check(func)) {
   30021             :         return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
   30022             :     }
   30023             :     return 0;
   30024             : }
   30025             : #else
   30026             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   30027             :     return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
   30028             : }
   30029             : #endif
   30030           3 : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
   30031             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   30032             :     __Pyx_Py_XDECREF_SET(
   30033             :         __Pyx_CyFunction_GetClassObj(f),
   30034             :             ((classobj) ? __Pyx_NewRef(classobj) : NULL));
   30035             : #else
   30036           6 :     __Pyx_Py_XDECREF_SET(
   30037             :         ((PyCMethodObject *) (f))->mm_class,
   30038             :         (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
   30039             : #endif
   30040           3 : }
   30041             : static PyObject *
   30042           0 : __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
   30043             : {
   30044           0 :     CYTHON_UNUSED_VAR(closure);
   30045           0 :     if (unlikely(op->func_doc == NULL)) {
   30046             : #if CYTHON_COMPILING_IN_LIMITED_API
   30047             :         op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
   30048             :         if (unlikely(!op->func_doc)) return NULL;
   30049             : #else
   30050           0 :         if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
   30051             : #if PY_MAJOR_VERSION >= 3
   30052           0 :             op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   30053             : #else
   30054             :             op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   30055             : #endif
   30056           0 :             if (unlikely(op->func_doc == NULL))
   30057             :                 return NULL;
   30058             :         } else {
   30059           0 :             Py_INCREF(Py_None);
   30060           0 :             return Py_None;
   30061             :         }
   30062             : #endif
   30063             :     }
   30064           0 :     Py_INCREF(op->func_doc);
   30065             :     return op->func_doc;
   30066             : }
   30067             : static int
   30068           0 : __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30069             : {
   30070           0 :     CYTHON_UNUSED_VAR(context);
   30071           0 :     if (value == NULL) {
   30072           0 :         value = Py_None;
   30073             :     }
   30074           0 :     Py_INCREF(value);
   30075           0 :     __Pyx_Py_XDECREF_SET(op->func_doc, value);
   30076           0 :     return 0;
   30077             : }
   30078             : static PyObject *
   30079           0 : __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
   30080             : {
   30081           0 :     CYTHON_UNUSED_VAR(context);
   30082           0 :     if (unlikely(op->func_name == NULL)) {
   30083             : #if CYTHON_COMPILING_IN_LIMITED_API
   30084             :         op->func_name = PyObject_GetAttrString(op->func, "__name__");
   30085             : #elif PY_MAJOR_VERSION >= 3
   30086           0 :         op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   30087             : #else
   30088             :         op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   30089             : #endif
   30090           0 :         if (unlikely(op->func_name == NULL))
   30091             :             return NULL;
   30092             :     }
   30093           0 :     Py_INCREF(op->func_name);
   30094             :     return op->func_name;
   30095             : }
   30096             : static int
   30097           0 : __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30098             : {
   30099           0 :     CYTHON_UNUSED_VAR(context);
   30100             : #if PY_MAJOR_VERSION >= 3
   30101           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   30102             : #else
   30103             :     if (unlikely(value == NULL || !PyString_Check(value)))
   30104             : #endif
   30105             :     {
   30106           0 :         PyErr_SetString(PyExc_TypeError,
   30107             :                         "__name__ must be set to a string object");
   30108           0 :         return -1;
   30109             :     }
   30110           0 :     Py_INCREF(value);
   30111           0 :     __Pyx_Py_XDECREF_SET(op->func_name, value);
   30112           0 :     return 0;
   30113             : }
   30114             : static PyObject *
   30115           0 : __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
   30116             : {
   30117           0 :     CYTHON_UNUSED_VAR(context);
   30118           0 :     Py_INCREF(op->func_qualname);
   30119           0 :     return op->func_qualname;
   30120             : }
   30121             : static int
   30122           0 : __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30123             : {
   30124           0 :     CYTHON_UNUSED_VAR(context);
   30125             : #if PY_MAJOR_VERSION >= 3
   30126           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   30127             : #else
   30128             :     if (unlikely(value == NULL || !PyString_Check(value)))
   30129             : #endif
   30130             :     {
   30131           0 :         PyErr_SetString(PyExc_TypeError,
   30132             :                         "__qualname__ must be set to a string object");
   30133           0 :         return -1;
   30134             :     }
   30135           0 :     Py_INCREF(value);
   30136           0 :     __Pyx_Py_XDECREF_SET(op->func_qualname, value);
   30137           0 :     return 0;
   30138             : }
   30139             : static PyObject *
   30140           0 : __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
   30141             : {
   30142           0 :     CYTHON_UNUSED_VAR(context);
   30143           0 :     if (unlikely(op->func_dict == NULL)) {
   30144           0 :         op->func_dict = PyDict_New();
   30145           0 :         if (unlikely(op->func_dict == NULL))
   30146             :             return NULL;
   30147             :     }
   30148           0 :     Py_INCREF(op->func_dict);
   30149             :     return op->func_dict;
   30150             : }
   30151             : static int
   30152           0 : __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30153             : {
   30154           0 :     CYTHON_UNUSED_VAR(context);
   30155           0 :     if (unlikely(value == NULL)) {
   30156           0 :         PyErr_SetString(PyExc_TypeError,
   30157             :                "function's dictionary may not be deleted");
   30158           0 :         return -1;
   30159             :     }
   30160           0 :     if (unlikely(!PyDict_Check(value))) {
   30161           0 :         PyErr_SetString(PyExc_TypeError,
   30162             :                "setting function's dictionary to a non-dict");
   30163           0 :         return -1;
   30164             :     }
   30165           0 :     Py_INCREF(value);
   30166           0 :     __Pyx_Py_XDECREF_SET(op->func_dict, value);
   30167           0 :     return 0;
   30168             : }
   30169             : static PyObject *
   30170           0 : __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
   30171             : {
   30172           0 :     CYTHON_UNUSED_VAR(context);
   30173           0 :     Py_INCREF(op->func_globals);
   30174           0 :     return op->func_globals;
   30175             : }
   30176             : static PyObject *
   30177           0 : __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
   30178             : {
   30179           0 :     CYTHON_UNUSED_VAR(op);
   30180           0 :     CYTHON_UNUSED_VAR(context);
   30181           0 :     Py_INCREF(Py_None);
   30182           0 :     return Py_None;
   30183             : }
   30184             : static PyObject *
   30185           0 : __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
   30186             : {
   30187           0 :     PyObject* result = (op->func_code) ? op->func_code : Py_None;
   30188           0 :     CYTHON_UNUSED_VAR(context);
   30189           0 :     Py_INCREF(result);
   30190           0 :     return result;
   30191             : }
   30192             : static int
   30193           0 : __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
   30194           0 :     int result = 0;
   30195           0 :     PyObject *res = op->defaults_getter((PyObject *) op);
   30196           0 :     if (unlikely(!res))
   30197             :         return -1;
   30198             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30199           0 :     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
   30200           0 :     Py_INCREF(op->defaults_tuple);
   30201           0 :     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
   30202           0 :     Py_INCREF(op->defaults_kwdict);
   30203             :     #else
   30204             :     op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
   30205             :     if (unlikely(!op->defaults_tuple)) result = -1;
   30206             :     else {
   30207             :         op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
   30208             :         if (unlikely(!op->defaults_kwdict)) result = -1;
   30209             :     }
   30210             :     #endif
   30211           0 :     Py_DECREF(res);
   30212             :     return result;
   30213             : }
   30214             : static int
   30215           0 : __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   30216           0 :     CYTHON_UNUSED_VAR(context);
   30217           0 :     if (!value) {
   30218             :         value = Py_None;
   30219           0 :     } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
   30220           0 :         PyErr_SetString(PyExc_TypeError,
   30221             :                         "__defaults__ must be set to a tuple object");
   30222           0 :         return -1;
   30223             :     }
   30224           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
   30225             :                  "currently affect the values used in function calls", 1);
   30226           0 :     Py_INCREF(value);
   30227           0 :     __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
   30228           0 :     return 0;
   30229             : }
   30230             : static PyObject *
   30231           0 : __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
   30232           0 :     PyObject* result = op->defaults_tuple;
   30233           0 :     CYTHON_UNUSED_VAR(context);
   30234           0 :     if (unlikely(!result)) {
   30235           0 :         if (op->defaults_getter) {
   30236           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   30237           0 :             result = op->defaults_tuple;
   30238             :         } else {
   30239             :             result = Py_None;
   30240             :         }
   30241             :     }
   30242           0 :     Py_INCREF(result);
   30243             :     return result;
   30244             : }
   30245             : static int
   30246           0 : __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   30247           0 :     CYTHON_UNUSED_VAR(context);
   30248           0 :     if (!value) {
   30249             :         value = Py_None;
   30250           0 :     } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
   30251           0 :         PyErr_SetString(PyExc_TypeError,
   30252             :                         "__kwdefaults__ must be set to a dict object");
   30253           0 :         return -1;
   30254             :     }
   30255           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
   30256             :                  "currently affect the values used in function calls", 1);
   30257           0 :     Py_INCREF(value);
   30258           0 :     __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
   30259           0 :     return 0;
   30260             : }
   30261             : static PyObject *
   30262           0 : __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
   30263           0 :     PyObject* result = op->defaults_kwdict;
   30264           0 :     CYTHON_UNUSED_VAR(context);
   30265           0 :     if (unlikely(!result)) {
   30266           0 :         if (op->defaults_getter) {
   30267           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   30268           0 :             result = op->defaults_kwdict;
   30269             :         } else {
   30270             :             result = Py_None;
   30271             :         }
   30272             :     }
   30273           0 :     Py_INCREF(result);
   30274             :     return result;
   30275             : }
   30276             : static int
   30277           0 : __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   30278           0 :     CYTHON_UNUSED_VAR(context);
   30279           0 :     if (!value || value == Py_None) {
   30280             :         value = NULL;
   30281           0 :     } else if (unlikely(!PyDict_Check(value))) {
   30282           0 :         PyErr_SetString(PyExc_TypeError,
   30283             :                         "__annotations__ must be set to a dict object");
   30284           0 :         return -1;
   30285             :     }
   30286           0 :     Py_XINCREF(value);
   30287           0 :     __Pyx_Py_XDECREF_SET(op->func_annotations, value);
   30288           0 :     return 0;
   30289             : }
   30290             : static PyObject *
   30291           0 : __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
   30292           0 :     PyObject* result = op->func_annotations;
   30293           0 :     CYTHON_UNUSED_VAR(context);
   30294           0 :     if (unlikely(!result)) {
   30295           0 :         result = PyDict_New();
   30296           0 :         if (unlikely(!result)) return NULL;
   30297           0 :         op->func_annotations = result;
   30298             :     }
   30299           0 :     Py_INCREF(result);
   30300             :     return result;
   30301             : }
   30302             : static PyObject *
   30303           0 : __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
   30304           0 :     int is_coroutine;
   30305           0 :     CYTHON_UNUSED_VAR(context);
   30306           0 :     if (op->func_is_coroutine) {
   30307           0 :         return __Pyx_NewRef(op->func_is_coroutine);
   30308             :     }
   30309           0 :     is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
   30310             : #if PY_VERSION_HEX >= 0x03050000
   30311           0 :     if (is_coroutine) {
   30312           0 :         PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
   30313           0 :         fromlist = PyList_New(1);
   30314           0 :         if (unlikely(!fromlist)) return NULL;
   30315           0 :         Py_INCREF(marker);
   30316             : #if CYTHON_ASSUME_SAFE_MACROS
   30317           0 :         PyList_SET_ITEM(fromlist, 0, marker);
   30318             : #else
   30319             :         if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
   30320             :             Py_DECREF(marker);
   30321             :             Py_DECREF(fromlist);
   30322             :             return NULL;
   30323             :         }
   30324             : #endif
   30325           0 :         module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
   30326           0 :         Py_DECREF(fromlist);
   30327           0 :         if (unlikely(!module)) goto ignore;
   30328           0 :         op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
   30329           0 :         Py_DECREF(module);
   30330           0 :         if (likely(op->func_is_coroutine)) {
   30331           0 :             return __Pyx_NewRef(op->func_is_coroutine);
   30332             :         }
   30333           0 : ignore:
   30334           0 :         PyErr_Clear();
   30335             :     }
   30336             : #endif
   30337           0 :     op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
   30338           0 :     return __Pyx_NewRef(op->func_is_coroutine);
   30339             : }
   30340             : #if CYTHON_COMPILING_IN_LIMITED_API
   30341             : static PyObject *
   30342             : __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
   30343             :     CYTHON_UNUSED_VAR(context);
   30344             :     return PyObject_GetAttrString(op->func, "__module__");
   30345             : }
   30346             : static int
   30347             : __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   30348             :     CYTHON_UNUSED_VAR(context);
   30349             :     return PyObject_SetAttrString(op->func, "__module__", value);
   30350             : }
   30351             : #endif
   30352             : static PyGetSetDef __pyx_CyFunction_getsets[] = {
   30353             :     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   30354             :     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   30355             :     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   30356             :     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   30357             :     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
   30358             :     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   30359             :     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   30360             :     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   30361             :     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   30362             :     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   30363             :     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   30364             :     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   30365             :     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   30366             :     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   30367             :     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   30368             :     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
   30369             :     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
   30370             :     {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
   30371             : #if CYTHON_COMPILING_IN_LIMITED_API
   30372             :     {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
   30373             : #endif
   30374             :     {0, 0, 0, 0, 0}
   30375             : };
   30376             : static PyMemberDef __pyx_CyFunction_members[] = {
   30377             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30378             :     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
   30379             : #endif
   30380             : #if CYTHON_USE_TYPE_SPECS
   30381             :     {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
   30382             : #if CYTHON_METH_FASTCALL
   30383             : #if CYTHON_BACKPORT_VECTORCALL
   30384             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
   30385             : #else
   30386             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30387             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
   30388             : #endif
   30389             : #endif
   30390             : #endif
   30391             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   30392             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
   30393             : #else
   30394             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
   30395             : #endif
   30396             : #endif
   30397             :     {0, 0, 0,  0, 0}
   30398             : };
   30399             : static PyObject *
   30400           0 : __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
   30401             : {
   30402           0 :     CYTHON_UNUSED_VAR(args);
   30403             : #if PY_MAJOR_VERSION >= 3
   30404           0 :     Py_INCREF(m->func_qualname);
   30405           0 :     return m->func_qualname;
   30406             : #else
   30407             :     return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
   30408             : #endif
   30409             : }
   30410             : static PyMethodDef __pyx_CyFunction_methods[] = {
   30411             :     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
   30412             :     {0, 0, 0, 0}
   30413             : };
   30414             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   30415             : #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
   30416             : #else
   30417             : #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
   30418             : #endif
   30419           6 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
   30420             :                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   30421             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30422           6 :     PyCFunctionObject *cf = (PyCFunctionObject*) op;
   30423             : #endif
   30424           6 :     if (unlikely(op == NULL))
   30425             :         return NULL;
   30426             : #if CYTHON_COMPILING_IN_LIMITED_API
   30427             :     op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
   30428             :     if (unlikely(!op->func)) return NULL;
   30429             : #endif
   30430           6 :     op->flags = flags;
   30431           6 :     __Pyx_CyFunction_weakreflist(op) = NULL;
   30432             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30433           6 :     cf->m_ml = ml;
   30434           6 :     cf->m_self = (PyObject *) op;
   30435             : #endif
   30436           6 :     Py_XINCREF(closure);
   30437           6 :     op->func_closure = closure;
   30438             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30439           6 :     Py_XINCREF(module);
   30440           6 :     cf->m_module = module;
   30441             : #endif
   30442           6 :     op->func_dict = NULL;
   30443           6 :     op->func_name = NULL;
   30444           6 :     Py_INCREF(qualname);
   30445           6 :     op->func_qualname = qualname;
   30446           6 :     op->func_doc = NULL;
   30447             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   30448             :     op->func_classobj = NULL;
   30449             : #else
   30450           6 :     ((PyCMethodObject*)op)->mm_class = NULL;
   30451             : #endif
   30452           6 :     op->func_globals = globals;
   30453           6 :     Py_INCREF(op->func_globals);
   30454           6 :     Py_XINCREF(code);
   30455           6 :     op->func_code = code;
   30456           6 :     op->defaults_pyobjects = 0;
   30457           6 :     op->defaults_size = 0;
   30458           6 :     op->defaults = NULL;
   30459           6 :     op->defaults_tuple = NULL;
   30460           6 :     op->defaults_kwdict = NULL;
   30461           6 :     op->defaults_getter = NULL;
   30462           6 :     op->func_annotations = NULL;
   30463           6 :     op->func_is_coroutine = NULL;
   30464             : #if CYTHON_METH_FASTCALL
   30465           6 :     switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
   30466           0 :     case METH_NOARGS:
   30467           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
   30468           0 :         break;
   30469           0 :     case METH_O:
   30470           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
   30471           0 :         break;
   30472           0 :     case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
   30473           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
   30474           0 :         break;
   30475           6 :     case METH_FASTCALL | METH_KEYWORDS:
   30476           6 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
   30477           6 :         break;
   30478           0 :     case METH_VARARGS | METH_KEYWORDS:
   30479           0 :         __Pyx_CyFunction_func_vectorcall(op) = NULL;
   30480           0 :         break;
   30481           0 :     default:
   30482           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   30483           0 :         Py_DECREF(op);
   30484             :         return NULL;
   30485             :     }
   30486             : #endif
   30487             :     return (PyObject *) op;
   30488             : }
   30489             : static int
   30490           0 : __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
   30491             : {
   30492           0 :     Py_CLEAR(m->func_closure);
   30493             : #if CYTHON_COMPILING_IN_LIMITED_API
   30494             :     Py_CLEAR(m->func);
   30495             : #else
   30496           0 :     Py_CLEAR(((PyCFunctionObject*)m)->m_module);
   30497             : #endif
   30498           0 :     Py_CLEAR(m->func_dict);
   30499           0 :     Py_CLEAR(m->func_name);
   30500           0 :     Py_CLEAR(m->func_qualname);
   30501           0 :     Py_CLEAR(m->func_doc);
   30502           0 :     Py_CLEAR(m->func_globals);
   30503           0 :     Py_CLEAR(m->func_code);
   30504             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30505             : #if PY_VERSION_HEX < 0x030900B1
   30506             :     Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
   30507             : #else
   30508             :     {
   30509           0 :         PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
   30510           0 :         ((PyCMethodObject *) (m))->mm_class = NULL;
   30511           0 :         Py_XDECREF(cls);
   30512             :     }
   30513             : #endif
   30514             : #endif
   30515           0 :     Py_CLEAR(m->defaults_tuple);
   30516           0 :     Py_CLEAR(m->defaults_kwdict);
   30517           0 :     Py_CLEAR(m->func_annotations);
   30518           0 :     Py_CLEAR(m->func_is_coroutine);
   30519           0 :     if (m->defaults) {
   30520             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   30521             :         int i;
   30522           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   30523           0 :             Py_XDECREF(pydefaults[i]);
   30524           0 :         PyObject_Free(m->defaults);
   30525           0 :         m->defaults = NULL;
   30526             :     }
   30527           0 :     return 0;
   30528             : }
   30529           0 : static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
   30530             : {
   30531           0 :     if (__Pyx_CyFunction_weakreflist(m) != NULL)
   30532           0 :         PyObject_ClearWeakRefs((PyObject *) m);
   30533           0 :     __Pyx_CyFunction_clear(m);
   30534           0 :     __Pyx_PyHeapTypeObject_GC_Del(m);
   30535           0 : }
   30536           0 : static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
   30537             : {
   30538           0 :     PyObject_GC_UnTrack(m);
   30539           0 :     __Pyx__CyFunction_dealloc(m);
   30540           0 : }
   30541           0 : static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
   30542             : {
   30543           0 :     Py_VISIT(m->func_closure);
   30544             : #if CYTHON_COMPILING_IN_LIMITED_API
   30545             :     Py_VISIT(m->func);
   30546             : #else
   30547           0 :     Py_VISIT(((PyCFunctionObject*)m)->m_module);
   30548             : #endif
   30549           0 :     Py_VISIT(m->func_dict);
   30550           0 :     Py_VISIT(m->func_name);
   30551           0 :     Py_VISIT(m->func_qualname);
   30552           0 :     Py_VISIT(m->func_doc);
   30553           0 :     Py_VISIT(m->func_globals);
   30554           0 :     Py_VISIT(m->func_code);
   30555             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30556           0 :     Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
   30557             : #endif
   30558           0 :     Py_VISIT(m->defaults_tuple);
   30559           0 :     Py_VISIT(m->defaults_kwdict);
   30560           0 :     Py_VISIT(m->func_is_coroutine);
   30561           0 :     if (m->defaults) {
   30562             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   30563             :         int i;
   30564           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   30565           0 :             Py_VISIT(pydefaults[i]);
   30566             :     }
   30567             :     return 0;
   30568             : }
   30569             : static PyObject*
   30570           0 : __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
   30571             : {
   30572             : #if PY_MAJOR_VERSION >= 3
   30573           0 :     return PyUnicode_FromFormat("<cyfunction %U at %p>",
   30574             :                                 op->func_qualname, (void *)op);
   30575             : #else
   30576             :     return PyString_FromFormat("<cyfunction %s at %p>",
   30577             :                                PyString_AsString(op->func_qualname), (void *)op);
   30578             : #endif
   30579             : }
   30580           0 : static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
   30581             : #if CYTHON_COMPILING_IN_LIMITED_API
   30582             :     PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
   30583             :     PyObject *py_name = NULL;
   30584             :     PyCFunction meth;
   30585             :     int flags;
   30586             :     meth = PyCFunction_GetFunction(f);
   30587             :     if (unlikely(!meth)) return NULL;
   30588             :     flags = PyCFunction_GetFlags(f);
   30589             :     if (unlikely(flags < 0)) return NULL;
   30590             : #else
   30591           0 :     PyCFunctionObject* f = (PyCFunctionObject*)func;
   30592           0 :     PyCFunction meth = f->m_ml->ml_meth;
   30593           0 :     int flags = f->m_ml->ml_flags;
   30594             : #endif
   30595           0 :     Py_ssize_t size;
   30596           0 :     switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
   30597           0 :     case METH_VARARGS:
   30598           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0))
   30599           0 :             return (*meth)(self, arg);
   30600             :         break;
   30601           0 :     case METH_VARARGS | METH_KEYWORDS:
   30602           0 :         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
   30603           0 :     case METH_NOARGS:
   30604           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   30605             : #if CYTHON_ASSUME_SAFE_MACROS
   30606           0 :             size = PyTuple_GET_SIZE(arg);
   30607             : #else
   30608             :             size = PyTuple_Size(arg);
   30609             :             if (unlikely(size < 0)) return NULL;
   30610             : #endif
   30611           0 :             if (likely(size == 0))
   30612           0 :                 return (*meth)(self, NULL);
   30613             : #if CYTHON_COMPILING_IN_LIMITED_API
   30614             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   30615             :             if (!py_name) return NULL;
   30616             :             PyErr_Format(PyExc_TypeError,
   30617             :                 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30618             :                 py_name, size);
   30619             :             Py_DECREF(py_name);
   30620             : #else
   30621           0 :             PyErr_Format(PyExc_TypeError,
   30622             :                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30623           0 :                 f->m_ml->ml_name, size);
   30624             : #endif
   30625           0 :             return NULL;
   30626             :         }
   30627             :         break;
   30628           0 :     case METH_O:
   30629           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   30630             : #if CYTHON_ASSUME_SAFE_MACROS
   30631           0 :             size = PyTuple_GET_SIZE(arg);
   30632             : #else
   30633             :             size = PyTuple_Size(arg);
   30634             :             if (unlikely(size < 0)) return NULL;
   30635             : #endif
   30636           0 :             if (likely(size == 1)) {
   30637           0 :                 PyObject *result, *arg0;
   30638             :                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30639           0 :                 arg0 = PyTuple_GET_ITEM(arg, 0);
   30640             :                 #else
   30641             :                 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
   30642             :                 #endif
   30643           0 :                 result = (*meth)(self, arg0);
   30644             :                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   30645             :                 Py_DECREF(arg0);
   30646             :                 #endif
   30647           0 :                 return result;
   30648             :             }
   30649             : #if CYTHON_COMPILING_IN_LIMITED_API
   30650             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   30651             :             if (!py_name) return NULL;
   30652             :             PyErr_Format(PyExc_TypeError,
   30653             :                 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30654             :                 py_name, size);
   30655             :             Py_DECREF(py_name);
   30656             : #else
   30657           0 :             PyErr_Format(PyExc_TypeError,
   30658             :                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30659           0 :                 f->m_ml->ml_name, size);
   30660             : #endif
   30661           0 :             return NULL;
   30662             :         }
   30663             :         break;
   30664           0 :     default:
   30665           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   30666           0 :         return NULL;
   30667             :     }
   30668             : #if CYTHON_COMPILING_IN_LIMITED_API
   30669             :     py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   30670             :     if (!py_name) return NULL;
   30671             :     PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
   30672             :                  py_name);
   30673             :     Py_DECREF(py_name);
   30674             : #else
   30675           0 :     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
   30676           0 :                  f->m_ml->ml_name);
   30677             : #endif
   30678           0 :     return NULL;
   30679             : }
   30680           0 : static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   30681           0 :     PyObject *self, *result;
   30682             : #if CYTHON_COMPILING_IN_LIMITED_API
   30683             :     self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
   30684             :     if (unlikely(!self) && PyErr_Occurred()) return NULL;
   30685             : #else
   30686           0 :     self = ((PyCFunctionObject*)func)->m_self;
   30687             : #endif
   30688           0 :     result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
   30689           0 :     return result;
   30690             : }
   30691           0 : static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
   30692           0 :     PyObject *result;
   30693           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
   30694             : #if CYTHON_METH_FASTCALL
   30695           0 :      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
   30696           0 :     if (vc) {
   30697             : #if CYTHON_ASSUME_SAFE_MACROS
   30698           0 :         return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
   30699             : #else
   30700             :         (void) &__Pyx_PyVectorcall_FastCallDict;
   30701             :         return PyVectorcall_Call(func, args, kw);
   30702             : #endif
   30703             :     }
   30704             : #endif
   30705           0 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   30706           0 :         Py_ssize_t argc;
   30707           0 :         PyObject *new_args;
   30708           0 :         PyObject *self;
   30709             : #if CYTHON_ASSUME_SAFE_MACROS
   30710           0 :         argc = PyTuple_GET_SIZE(args);
   30711             : #else
   30712             :         argc = PyTuple_Size(args);
   30713             :         if (unlikely(!argc) < 0) return NULL;
   30714             : #endif
   30715           0 :         new_args = PyTuple_GetSlice(args, 1, argc);
   30716           0 :         if (unlikely(!new_args))
   30717             :             return NULL;
   30718           0 :         self = PyTuple_GetItem(args, 0);
   30719           0 :         if (unlikely(!self)) {
   30720           0 :             Py_DECREF(new_args);
   30721             : #if PY_MAJOR_VERSION > 2
   30722           0 :             PyErr_Format(PyExc_TypeError,
   30723             :                          "unbound method %.200S() needs an argument",
   30724             :                          cyfunc->func_qualname);
   30725             : #else
   30726             :             PyErr_SetString(PyExc_TypeError,
   30727             :                             "unbound method needs an argument");
   30728             : #endif
   30729           0 :             return NULL;
   30730             :         }
   30731           0 :         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
   30732           0 :         Py_DECREF(new_args);
   30733             :     } else {
   30734           0 :         result = __Pyx_CyFunction_Call(func, args, kw);
   30735             :     }
   30736             :     return result;
   30737             : }
   30738             : #if CYTHON_METH_FASTCALL
   30739         396 : static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
   30740             : {
   30741         396 :     int ret = 0;
   30742         396 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   30743           0 :         if (unlikely(nargs < 1)) {
   30744           0 :             PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
   30745           0 :                          ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   30746           0 :             return -1;
   30747             :         }
   30748             :         ret = 1;
   30749             :     }
   30750         396 :     if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
   30751           0 :         PyErr_Format(PyExc_TypeError,
   30752           0 :                      "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   30753           0 :         return -1;
   30754             :     }
   30755             :     return ret;
   30756             : }
   30757           0 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   30758             : {
   30759           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   30760           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   30761             : #if CYTHON_BACKPORT_VECTORCALL
   30762             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   30763             : #else
   30764           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   30765             : #endif
   30766           0 :     PyObject *self;
   30767           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   30768           0 :     case 1:
   30769           0 :         self = args[0];
   30770           0 :         args += 1;
   30771           0 :         nargs -= 1;
   30772           0 :         break;
   30773           0 :     case 0:
   30774           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   30775           0 :         break;
   30776             :     default:
   30777             :         return NULL;
   30778             :     }
   30779           0 :     if (unlikely(nargs != 0)) {
   30780           0 :         PyErr_Format(PyExc_TypeError,
   30781             :             "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30782             :             def->ml_name, nargs);
   30783           0 :         return NULL;
   30784             :     }
   30785           0 :     return def->ml_meth(self, NULL);
   30786             : }
   30787           0 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   30788             : {
   30789           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   30790           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   30791             : #if CYTHON_BACKPORT_VECTORCALL
   30792             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   30793             : #else
   30794           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   30795             : #endif
   30796           0 :     PyObject *self;
   30797           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   30798           0 :     case 1:
   30799           0 :         self = args[0];
   30800           0 :         args += 1;
   30801           0 :         nargs -= 1;
   30802           0 :         break;
   30803           0 :     case 0:
   30804           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   30805           0 :         break;
   30806             :     default:
   30807             :         return NULL;
   30808             :     }
   30809           0 :     if (unlikely(nargs != 1)) {
   30810           0 :         PyErr_Format(PyExc_TypeError,
   30811             :             "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   30812             :             def->ml_name, nargs);
   30813           0 :         return NULL;
   30814             :     }
   30815           0 :     return def->ml_meth(self, args[0]);
   30816             : }
   30817         396 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   30818             : {
   30819         396 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   30820         396 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   30821             : #if CYTHON_BACKPORT_VECTORCALL
   30822             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   30823             : #else
   30824         396 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   30825             : #endif
   30826         396 :     PyObject *self;
   30827         396 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   30828           0 :     case 1:
   30829           0 :         self = args[0];
   30830           0 :         args += 1;
   30831           0 :         nargs -= 1;
   30832           0 :         break;
   30833         396 :     case 0:
   30834         396 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   30835         396 :         break;
   30836             :     default:
   30837             :         return NULL;
   30838             :     }
   30839         396 :     return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
   30840             : }
   30841           0 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   30842             : {
   30843           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   30844           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   30845           0 :     PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
   30846             : #if CYTHON_BACKPORT_VECTORCALL
   30847             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   30848             : #else
   30849           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   30850             : #endif
   30851           0 :     PyObject *self;
   30852           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   30853           0 :     case 1:
   30854           0 :         self = args[0];
   30855           0 :         args += 1;
   30856           0 :         nargs -= 1;
   30857           0 :         break;
   30858           0 :     case 0:
   30859           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   30860           0 :         break;
   30861             :     default:
   30862             :         return NULL;
   30863             :     }
   30864           0 :     return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
   30865             : }
   30866             : #endif
   30867             : #if CYTHON_USE_TYPE_SPECS
   30868             : static PyType_Slot __pyx_CyFunctionType_slots[] = {
   30869             :     {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
   30870             :     {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
   30871             :     {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
   30872             :     {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
   30873             :     {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
   30874             :     {Py_tp_methods, (void *)__pyx_CyFunction_methods},
   30875             :     {Py_tp_members, (void *)__pyx_CyFunction_members},
   30876             :     {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
   30877             :     {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
   30878             :     {0, 0},
   30879             : };
   30880             : static PyType_Spec __pyx_CyFunctionType_spec = {
   30881             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   30882             :     sizeof(__pyx_CyFunctionObject),
   30883             :     0,
   30884             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   30885             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   30886             : #endif
   30887             : #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
   30888             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   30889             : #endif
   30890             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   30891             :     __pyx_CyFunctionType_slots
   30892             : };
   30893             : #else
   30894             : static PyTypeObject __pyx_CyFunctionType_type = {
   30895             :     PyVarObject_HEAD_INIT(0, 0)
   30896             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   30897             :     sizeof(__pyx_CyFunctionObject),
   30898             :     0,
   30899             :     (destructor) __Pyx_CyFunction_dealloc,
   30900             : #if !CYTHON_METH_FASTCALL
   30901             :     0,
   30902             : #elif CYTHON_BACKPORT_VECTORCALL
   30903             :     (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
   30904             : #else
   30905             :     offsetof(PyCFunctionObject, vectorcall),
   30906             : #endif
   30907             :     0,
   30908             :     0,
   30909             : #if PY_MAJOR_VERSION < 3
   30910             :     0,
   30911             : #else
   30912             :     0,
   30913             : #endif
   30914             :     (reprfunc) __Pyx_CyFunction_repr,
   30915             :     0,
   30916             :     0,
   30917             :     0,
   30918             :     0,
   30919             :     __Pyx_CyFunction_CallAsMethod,
   30920             :     0,
   30921             :     0,
   30922             :     0,
   30923             :     0,
   30924             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   30925             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   30926             : #endif
   30927             : #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
   30928             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   30929             : #endif
   30930             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   30931             :     0,
   30932             :     (traverseproc) __Pyx_CyFunction_traverse,
   30933             :     (inquiry) __Pyx_CyFunction_clear,
   30934             :     0,
   30935             : #if PY_VERSION_HEX < 0x030500A0
   30936             :     offsetof(__pyx_CyFunctionObject, func_weakreflist),
   30937             : #else
   30938             :     offsetof(PyCFunctionObject, m_weakreflist),
   30939             : #endif
   30940             :     0,
   30941             :     0,
   30942             :     __pyx_CyFunction_methods,
   30943             :     __pyx_CyFunction_members,
   30944             :     __pyx_CyFunction_getsets,
   30945             :     0,
   30946             :     0,
   30947             :     __Pyx_PyMethod_New,
   30948             :     0,
   30949             :     offsetof(__pyx_CyFunctionObject, func_dict),
   30950             :     0,
   30951             :     0,
   30952             :     0,
   30953             :     0,
   30954             :     0,
   30955             :     0,
   30956             :     0,
   30957             :     0,
   30958             :     0,
   30959             :     0,
   30960             :     0,
   30961             :     0,
   30962             : #if PY_VERSION_HEX >= 0x030400a1
   30963             :     0,
   30964             : #endif
   30965             : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   30966             :     0,
   30967             : #endif
   30968             : #if __PYX_NEED_TP_PRINT_SLOT
   30969             :     0,
   30970             : #endif
   30971             : #if PY_VERSION_HEX >= 0x030C0000
   30972             :     0,
   30973             : #endif
   30974             : #if PY_VERSION_HEX >= 0x030d00A4
   30975             :     0,
   30976             : #endif
   30977             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   30978             :     0,
   30979             : #endif
   30980             : };
   30981             : #endif
   30982           3 : static int __pyx_CyFunction_init(PyObject *module) {
   30983             : #if CYTHON_USE_TYPE_SPECS
   30984             :     __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
   30985             : #else
   30986           3 :     CYTHON_UNUSED_VAR(module);
   30987           3 :     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
   30988             : #endif
   30989           3 :     if (unlikely(__pyx_CyFunctionType == NULL)) {
   30990           0 :         return -1;
   30991             :     }
   30992             :     return 0;
   30993             : }
   30994             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
   30995             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   30996             :     m->defaults = PyObject_Malloc(size);
   30997             :     if (unlikely(!m->defaults))
   30998             :         return PyErr_NoMemory();
   30999             :     memset(m->defaults, 0, size);
   31000             :     m->defaults_pyobjects = pyobjects;
   31001             :     m->defaults_size = size;
   31002             :     return m->defaults;
   31003             : }
   31004           3 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
   31005           3 :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31006           3 :     m->defaults_tuple = tuple;
   31007           6 :     Py_INCREF(tuple);
   31008             : }
   31009             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
   31010             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31011             :     m->defaults_kwdict = dict;
   31012             :     Py_INCREF(dict);
   31013             : }
   31014             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
   31015             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31016             :     m->func_annotations = dict;
   31017             :     Py_INCREF(dict);
   31018             : }
   31019             : 
   31020             : /* CythonFunction */
   31021           6 : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
   31022             :                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   31023           6 :     PyObject *op = __Pyx_CyFunction_Init(
   31024           6 :         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
   31025             :         ml, flags, qualname, closure, module, globals, code
   31026             :     );
   31027           6 :     if (likely(op)) {
   31028           6 :         PyObject_GC_Track(op);
   31029             :     }
   31030           6 :     return op;
   31031             : }
   31032             : 
   31033             : /* PyObjectCall2Args */
   31034             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
   31035             :     PyObject *args[3] = {NULL, arg1, arg2};
   31036             :     return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   31037             : }
   31038             : 
   31039             : /* PyObjectLookupSpecial */
   31040             : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
   31041             : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
   31042             :     PyObject *res;
   31043             :     PyTypeObject *tp = Py_TYPE(obj);
   31044             : #if PY_MAJOR_VERSION < 3
   31045             :     if (unlikely(PyInstance_Check(obj)))
   31046             :         return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
   31047             : #endif
   31048             :     res = _PyType_Lookup(tp, attr_name);
   31049             :     if (likely(res)) {
   31050             :         descrgetfunc f = Py_TYPE(res)->tp_descr_get;
   31051             :         if (!f) {
   31052             :             Py_INCREF(res);
   31053             :         } else {
   31054             :             res = f(res, obj, (PyObject *)tp);
   31055             :         }
   31056             :     } else if (with_error) {
   31057             :         PyErr_SetObject(PyExc_AttributeError, attr_name);
   31058             :     }
   31059             :     return res;
   31060             : }
   31061             : #endif
   31062             : 
   31063             : /* Py3ClassCreate */
   31064           3 : static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
   31065             :                                            PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
   31066           3 :     PyObject *ns;
   31067           3 :     if (metaclass) {
   31068           3 :         PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
   31069           3 :         if (prep) {
   31070           3 :             PyObject *pargs[3] = {NULL, name, bases};
   31071           3 :             ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
   31072           6 :             Py_DECREF(prep);
   31073             :         } else {
   31074           0 :             if (unlikely(PyErr_Occurred()))
   31075             :                 return NULL;
   31076           0 :             ns = PyDict_New();
   31077             :         }
   31078             :     } else {
   31079           0 :         ns = PyDict_New();
   31080             :     }
   31081           3 :     if (unlikely(!ns))
   31082             :         return NULL;
   31083           3 :     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
   31084             : #if PY_VERSION_HEX >= 0x03030000
   31085           3 :     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
   31086             : #else
   31087             :     CYTHON_MAYBE_UNUSED_VAR(qualname);
   31088             : #endif
   31089           3 :     if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
   31090             :     return ns;
   31091           0 : bad:
   31092           0 :     Py_DECREF(ns);
   31093             :     return NULL;
   31094             : }
   31095             : #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
   31096             : static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
   31097             :     PyTypeObject *type = (PyTypeObject*) type_obj;
   31098             :     PyObject *names_to_set, *key, *value, *set_name, *tmp;
   31099             :     Py_ssize_t i = 0;
   31100             : #if CYTHON_USE_TYPE_SLOTS
   31101             :     names_to_set = PyDict_Copy(type->tp_dict);
   31102             : #else
   31103             :     {
   31104             :         PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
   31105             :         names_to_set = NULL;
   31106             :         if (likely(d)) {
   31107             :             PyObject *names_to_set = PyDict_New();
   31108             :             int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
   31109             :             Py_DECREF(d);
   31110             :             if (unlikely(ret < 0))
   31111             :                 Py_CLEAR(names_to_set);
   31112             :         }
   31113             :     }
   31114             : #endif
   31115             :     if (unlikely(names_to_set == NULL))
   31116             :         goto bad;
   31117             :     while (PyDict_Next(names_to_set, &i, &key, &value)) {
   31118             :         set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
   31119             :         if (unlikely(set_name != NULL)) {
   31120             :             tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
   31121             :             Py_DECREF(set_name);
   31122             :             if (unlikely(tmp == NULL)) {
   31123             :                 __Pyx_TypeName value_type_name =
   31124             :                     __Pyx_PyType_GetName(Py_TYPE(value));
   31125             :                 __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
   31126             :                 PyErr_Format(PyExc_RuntimeError,
   31127             : #if PY_MAJOR_VERSION >= 3
   31128             :                     "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
   31129             :                     value_type_name, key, type_name);
   31130             : #else
   31131             :                     "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
   31132             :                     value_type_name,
   31133             :                     PyString_Check(key) ? PyString_AS_STRING(key) : "?",
   31134             :                     type_name);
   31135             : #endif
   31136             :                 goto bad;
   31137             :             } else {
   31138             :                 Py_DECREF(tmp);
   31139             :             }
   31140             :         }
   31141             :         else if (unlikely(PyErr_Occurred())) {
   31142             :             goto bad;
   31143             :         }
   31144             :     }
   31145             :     Py_DECREF(names_to_set);
   31146             :     return 0;
   31147             : bad:
   31148             :     Py_XDECREF(names_to_set);
   31149             :     return -1;
   31150             : }
   31151             : static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
   31152             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   31153             :     PyTypeObject *type = (PyTypeObject*) type_obj;
   31154             :     PyObject *mro = type->tp_mro;
   31155             :     Py_ssize_t i, nbases;
   31156             :     if (unlikely(!mro)) goto done;
   31157             :     (void) &__Pyx_GetBuiltinName;
   31158             :     Py_INCREF(mro);
   31159             :     nbases = PyTuple_GET_SIZE(mro);
   31160             :     assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
   31161             :     for (i = 1; i < nbases-1; i++) {
   31162             :         PyObject *base, *dict, *meth;
   31163             :         base = PyTuple_GET_ITEM(mro, i);
   31164             :         dict = ((PyTypeObject *)base)->tp_dict;
   31165             :         meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
   31166             :         if (unlikely(meth)) {
   31167             :             descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
   31168             :             PyObject *res;
   31169             :             Py_INCREF(meth);
   31170             :             if (likely(f)) {
   31171             :                 res = f(meth, NULL, type_obj);
   31172             :                 Py_DECREF(meth);
   31173             :                 if (unlikely(!res)) goto bad;
   31174             :                 meth = res;
   31175             :             }
   31176             :             res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
   31177             :             Py_DECREF(meth);
   31178             :             if (unlikely(!res)) goto bad;
   31179             :             Py_DECREF(res);
   31180             :             goto done;
   31181             :         } else if (unlikely(PyErr_Occurred())) {
   31182             :             goto bad;
   31183             :         }
   31184             :     }
   31185             : done:
   31186             :     Py_XDECREF(mro);
   31187             :     return type_obj;
   31188             : bad:
   31189             :     Py_XDECREF(mro);
   31190             :     Py_DECREF(type_obj);
   31191             :     return NULL;
   31192             : #else
   31193             :     PyObject *super_type, *super, *func, *res;
   31194             : #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
   31195             :     super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
   31196             : #else
   31197             :     super_type = (PyObject*) &PySuper_Type;
   31198             :     (void) &__Pyx_GetBuiltinName;
   31199             : #endif
   31200             :     super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
   31201             : #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
   31202             :     Py_XDECREF(super_type);
   31203             : #endif
   31204             :     if (unlikely(!super)) {
   31205             :         Py_CLEAR(type_obj);
   31206             :         goto done;
   31207             :     }
   31208             :     func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
   31209             :     Py_DECREF(super);
   31210             :     if (likely(!func)) {
   31211             :         if (unlikely(PyErr_Occurred()))
   31212             :             Py_CLEAR(type_obj);
   31213             :         goto done;
   31214             :     }
   31215             :     res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
   31216             :     Py_DECREF(func);
   31217             :     if (unlikely(!res))
   31218             :         Py_CLEAR(type_obj);
   31219             :     Py_XDECREF(res);
   31220             : done:
   31221             :     return type_obj;
   31222             : #endif
   31223             : }
   31224             : #endif
   31225           3 : static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
   31226             :                                       PyObject *dict, PyObject *mkw,
   31227             :                                       int calculate_metaclass, int allow_py2_metaclass) {
   31228           3 :     PyObject *result;
   31229           3 :     PyObject *owned_metaclass = NULL;
   31230           3 :     PyObject *margs[4] = {NULL, name, bases, dict};
   31231           3 :     if (allow_py2_metaclass) {
   31232           0 :         owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
   31233           0 :         if (owned_metaclass) {
   31234             :             metaclass = owned_metaclass;
   31235           0 :         } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
   31236           0 :             PyErr_Clear();
   31237             :         } else {
   31238             :             return NULL;
   31239             :         }
   31240             :     }
   31241           3 :     if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
   31242           0 :         metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
   31243           0 :         Py_XDECREF(owned_metaclass);
   31244           0 :         if (unlikely(!metaclass))
   31245             :             return NULL;
   31246             :         owned_metaclass = metaclass;
   31247             :     }
   31248           3 :     result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
   31249             : #if PY_VERSION_HEX < 0x030600A4
   31250             :         (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
   31251             : #else
   31252             :         mkw
   31253             : #endif
   31254             :     );
   31255           3 :     Py_XDECREF(owned_metaclass);
   31256             : #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
   31257             :     if (likely(result) && likely(PyType_Check(result))) {
   31258             :         if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
   31259             :             Py_CLEAR(result);
   31260             :         } else {
   31261             :             result = __Pyx_InitSubclassPEP487(result, mkw);
   31262             :         }
   31263             :     }
   31264             : #else
   31265           3 :     (void) &__Pyx_GetBuiltinName;
   31266             : #endif
   31267           3 :     return result;
   31268             : }
   31269             : 
   31270             : /* CyFunctionClassCell */
   31271           3 : static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) {
   31272           3 :     Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions);
   31273           6 :     for (i = 0; i < count; i++) {
   31274           3 :         __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *)
   31275             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   31276           3 :             PyList_GET_ITEM(cyfunctions, i);
   31277             : #else
   31278             :             PySequence_ITEM(cyfunctions, i);
   31279             :         if (unlikely(!m))
   31280             :             return -1;
   31281             : #endif
   31282           3 :         __Pyx_CyFunction_SetClassObj(m, classobj);
   31283             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   31284             :         Py_DECREF((PyObject*)m);
   31285             : #endif
   31286             :     }
   31287           3 :     return 0;
   31288             : }
   31289             : 
   31290             : /* CLineInTraceback */
   31291             : #ifndef CYTHON_CLINE_IN_TRACEBACK
   31292           0 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
   31293           0 :     PyObject *use_cline;
   31294           0 :     PyObject *ptype, *pvalue, *ptraceback;
   31295             : #if CYTHON_COMPILING_IN_CPYTHON
   31296           0 :     PyObject **cython_runtime_dict;
   31297             : #endif
   31298           0 :     CYTHON_MAYBE_UNUSED_VAR(tstate);
   31299           0 :     if (unlikely(!__pyx_cython_runtime)) {
   31300             :         return c_line;
   31301             :     }
   31302           0 :     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   31303             : #if CYTHON_COMPILING_IN_CPYTHON
   31304           0 :     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
   31305           0 :     if (likely(cython_runtime_dict)) {
   31306           0 :         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
   31307             :             use_cline, *cython_runtime_dict,
   31308             :             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
   31309             :     } else
   31310             : #endif
   31311             :     {
   31312           0 :       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
   31313           0 :       if (use_cline_obj) {
   31314           0 :         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
   31315           0 :         Py_DECREF(use_cline_obj);
   31316             :       } else {
   31317           0 :         PyErr_Clear();
   31318           0 :         use_cline = NULL;
   31319             :       }
   31320             :     }
   31321           0 :     if (!use_cline) {
   31322           0 :         c_line = 0;
   31323           0 :         (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
   31324             :     }
   31325           0 :     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
   31326             :         c_line = 0;
   31327             :     }
   31328           0 :     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   31329           0 :     return c_line;
   31330             : }
   31331             : #endif
   31332             : 
   31333             : /* CodeObjectCache */
   31334             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31335           0 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
   31336           0 :     int start = 0, mid = 0, end = count - 1;
   31337           0 :     if (end >= 0 && code_line > entries[end].code_line) {
   31338             :         return count;
   31339             :     }
   31340           0 :     while (start < end) {
   31341           0 :         mid = start + (end - start) / 2;
   31342           0 :         if (code_line < entries[mid].code_line) {
   31343             :             end = mid;
   31344           0 :         } else if (code_line > entries[mid].code_line) {
   31345           0 :              start = mid + 1;
   31346             :         } else {
   31347           0 :             return mid;
   31348             :         }
   31349             :     }
   31350           0 :     if (code_line <= entries[mid].code_line) {
   31351             :         return mid;
   31352             :     } else {
   31353           0 :         return mid + 1;
   31354             :     }
   31355             : }
   31356           0 : static PyCodeObject *__pyx_find_code_object(int code_line) {
   31357           0 :     PyCodeObject* code_object;
   31358           0 :     int pos;
   31359           0 :     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
   31360             :         return NULL;
   31361             :     }
   31362           0 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   31363           0 :     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
   31364             :         return NULL;
   31365             :     }
   31366           0 :     code_object = __pyx_code_cache.entries[pos].code_object;
   31367           0 :     Py_INCREF(code_object);
   31368             :     return code_object;
   31369             : }
   31370           0 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
   31371           0 :     int pos, i;
   31372           0 :     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
   31373           0 :     if (unlikely(!code_line)) {
   31374             :         return;
   31375             :     }
   31376           0 :     if (unlikely(!entries)) {
   31377           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
   31378           0 :         if (likely(entries)) {
   31379           0 :             __pyx_code_cache.entries = entries;
   31380           0 :             __pyx_code_cache.max_count = 64;
   31381           0 :             __pyx_code_cache.count = 1;
   31382           0 :             entries[0].code_line = code_line;
   31383           0 :             entries[0].code_object = code_object;
   31384           0 :             Py_INCREF(code_object);
   31385             :         }
   31386           0 :         return;
   31387             :     }
   31388           0 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   31389           0 :     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
   31390           0 :         PyCodeObject* tmp = entries[pos].code_object;
   31391           0 :         entries[pos].code_object = code_object;
   31392           0 :         Py_DECREF(tmp);
   31393           0 :         return;
   31394             :     }
   31395           0 :     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
   31396           0 :         int new_max = __pyx_code_cache.max_count + 64;
   31397           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
   31398           0 :             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
   31399           0 :         if (unlikely(!entries)) {
   31400             :             return;
   31401             :         }
   31402           0 :         __pyx_code_cache.entries = entries;
   31403           0 :         __pyx_code_cache.max_count = new_max;
   31404             :     }
   31405           0 :     for (i=__pyx_code_cache.count; i>pos; i--) {
   31406           0 :         entries[i] = entries[i-1];
   31407             :     }
   31408           0 :     entries[pos].code_line = code_line;
   31409           0 :     entries[pos].code_object = code_object;
   31410           0 :     __pyx_code_cache.count++;
   31411           0 :     Py_INCREF(code_object);
   31412             : }
   31413             : #endif
   31414             : 
   31415             : /* AddTraceback */
   31416             : #include "compile.h"
   31417             : #include "frameobject.h"
   31418             : #include "traceback.h"
   31419             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
   31420             :   #ifndef Py_BUILD_CORE
   31421             :     #define Py_BUILD_CORE 1
   31422             :   #endif
   31423             :   #include "internal/pycore_frame.h"
   31424             : #endif
   31425             : #if CYTHON_COMPILING_IN_LIMITED_API
   31426             : static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
   31427             :                                                        PyObject *firstlineno, PyObject *name) {
   31428             :     PyObject *replace = NULL;
   31429             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
   31430             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
   31431             :     replace = PyObject_GetAttrString(code, "replace");
   31432             :     if (likely(replace)) {
   31433             :         PyObject *result;
   31434             :         result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
   31435             :         Py_DECREF(replace);
   31436             :         return result;
   31437             :     }
   31438             :     PyErr_Clear();
   31439             :     #if __PYX_LIMITED_VERSION_HEX < 0x030780000
   31440             :     {
   31441             :         PyObject *compiled = NULL, *result = NULL;
   31442             :         if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
   31443             :         if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
   31444             :         compiled = Py_CompileString(
   31445             :             "out = type(code)(\n"
   31446             :             "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
   31447             :             "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
   31448             :             "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
   31449             :             "  code.co_lnotab)\n", "<dummy>", Py_file_input);
   31450             :         if (!compiled) return NULL;
   31451             :         result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
   31452             :         Py_DECREF(compiled);
   31453             :         if (!result) PyErr_Print();
   31454             :         Py_DECREF(result);
   31455             :         result = PyDict_GetItemString(scratch_dict, "out");
   31456             :         if (result) Py_INCREF(result);
   31457             :         return result;
   31458             :     }
   31459             :     #else
   31460             :     return NULL;
   31461             :     #endif
   31462             : }
   31463             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   31464             :                                int py_line, const char *filename) {
   31465             :     PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
   31466             :     PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
   31467             :     PyObject *exc_type, *exc_value, *exc_traceback;
   31468             :     int success = 0;
   31469             :     if (c_line) {
   31470             :         (void) __pyx_cfilenm;
   31471             :         (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
   31472             :     }
   31473             :     PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
   31474             :     code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
   31475             :     if (unlikely(!code_object)) goto bad;
   31476             :     py_py_line = PyLong_FromLong(py_line);
   31477             :     if (unlikely(!py_py_line)) goto bad;
   31478             :     py_funcname = PyUnicode_FromString(funcname);
   31479             :     if (unlikely(!py_funcname)) goto bad;
   31480             :     dict = PyDict_New();
   31481             :     if (unlikely(!dict)) goto bad;
   31482             :     {
   31483             :         PyObject *old_code_object = code_object;
   31484             :         code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
   31485             :         Py_DECREF(old_code_object);
   31486             :     }
   31487             :     if (unlikely(!code_object)) goto bad;
   31488             :     getframe = PySys_GetObject("_getframe");
   31489             :     if (unlikely(!getframe)) goto bad;
   31490             :     if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
   31491             :     frame = PyEval_EvalCode(code_object, dict, dict);
   31492             :     if (unlikely(!frame) || frame == Py_None) goto bad;
   31493             :     success = 1;
   31494             :   bad:
   31495             :     PyErr_Restore(exc_type, exc_value, exc_traceback);
   31496             :     Py_XDECREF(code_object);
   31497             :     Py_XDECREF(py_py_line);
   31498             :     Py_XDECREF(py_funcname);
   31499             :     Py_XDECREF(dict);
   31500             :     Py_XDECREF(replace);
   31501             :     if (success) {
   31502             :         PyTraceBack_Here(
   31503             :             (struct _frame*)frame);
   31504             :     }
   31505             :     Py_XDECREF(frame);
   31506             : }
   31507             : #else
   31508           0 : static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
   31509             :             const char *funcname, int c_line,
   31510             :             int py_line, const char *filename) {
   31511           0 :     PyCodeObject *py_code = NULL;
   31512           0 :     PyObject *py_funcname = NULL;
   31513             :     #if PY_MAJOR_VERSION < 3
   31514             :     PyObject *py_srcfile = NULL;
   31515             :     py_srcfile = PyString_FromString(filename);
   31516             :     if (!py_srcfile) goto bad;
   31517             :     #endif
   31518           0 :     if (c_line) {
   31519             :         #if PY_MAJOR_VERSION < 3
   31520             :         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   31521             :         if (!py_funcname) goto bad;
   31522             :         #else
   31523           0 :         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   31524           0 :         if (!py_funcname) goto bad;
   31525           0 :         funcname = PyUnicode_AsUTF8(py_funcname);
   31526           0 :         if (!funcname) goto bad;
   31527             :         #endif
   31528             :     }
   31529             :     else {
   31530             :         #if PY_MAJOR_VERSION < 3
   31531             :         py_funcname = PyString_FromString(funcname);
   31532             :         if (!py_funcname) goto bad;
   31533             :         #endif
   31534           0 :     }
   31535             :     #if PY_MAJOR_VERSION < 3
   31536             :     py_code = __Pyx_PyCode_New(
   31537             :         0,
   31538             :         0,
   31539             :         0,
   31540             :         0,
   31541             :         0,
   31542             :         0,
   31543             :         __pyx_empty_bytes, /*PyObject *code,*/
   31544             :         __pyx_empty_tuple, /*PyObject *consts,*/
   31545             :         __pyx_empty_tuple, /*PyObject *names,*/
   31546             :         __pyx_empty_tuple, /*PyObject *varnames,*/
   31547             :         __pyx_empty_tuple, /*PyObject *freevars,*/
   31548             :         __pyx_empty_tuple, /*PyObject *cellvars,*/
   31549             :         py_srcfile,   /*PyObject *filename,*/
   31550             :         py_funcname,  /*PyObject *name,*/
   31551             :         py_line,
   31552             :         __pyx_empty_bytes  /*PyObject *lnotab*/
   31553             :     );
   31554             :     Py_DECREF(py_srcfile);
   31555             :     #else
   31556           0 :     py_code = PyCode_NewEmpty(filename, funcname, py_line);
   31557             :     #endif
   31558           0 :     Py_XDECREF(py_funcname);
   31559           0 :     return py_code;
   31560           0 : bad:
   31561           0 :     Py_XDECREF(py_funcname);
   31562             :     #if PY_MAJOR_VERSION < 3
   31563             :     Py_XDECREF(py_srcfile);
   31564             :     #endif
   31565           0 :     return NULL;
   31566             : }
   31567           0 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   31568             :                                int py_line, const char *filename) {
   31569           0 :     PyCodeObject *py_code = 0;
   31570           0 :     PyFrameObject *py_frame = 0;
   31571           0 :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   31572           0 :     PyObject *ptype, *pvalue, *ptraceback;
   31573           0 :     if (c_line) {
   31574           0 :         c_line = __Pyx_CLineForTraceback(tstate, c_line);
   31575             :     }
   31576           0 :     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
   31577           0 :     if (!py_code) {
   31578           0 :         __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   31579           0 :         py_code = __Pyx_CreateCodeObjectForTraceback(
   31580             :             funcname, c_line, py_line, filename);
   31581           0 :         if (!py_code) {
   31582             :             /* If the code object creation fails, then we should clear the
   31583             :                fetched exception references and propagate the new exception */
   31584           0 :             Py_XDECREF(ptype);
   31585           0 :             Py_XDECREF(pvalue);
   31586           0 :             Py_XDECREF(ptraceback);
   31587           0 :             goto bad;
   31588             :         }
   31589           0 :         __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   31590           0 :         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
   31591             :     }
   31592           0 :     py_frame = PyFrame_New(
   31593             :         tstate,            /*PyThreadState *tstate,*/
   31594             :         py_code,           /*PyCodeObject *code,*/
   31595           0 :         __pyx_d,    /*PyObject *globals,*/
   31596             :         0                  /*PyObject *locals*/
   31597             :     );
   31598           0 :     if (!py_frame) goto bad;
   31599           0 :     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
   31600           0 :     PyTraceBack_Here(py_frame);
   31601           0 : bad:
   31602           0 :     Py_XDECREF(py_code);
   31603           0 :     Py_XDECREF(py_frame);
   31604           0 : }
   31605             : #endif
   31606             : 
   31607             : #if PY_MAJOR_VERSION < 3
   31608             : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
   31609             :     __Pyx_TypeName obj_type_name;
   31610             :     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
   31611             :         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
   31612             :         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
   31613             :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   31614             :     PyErr_Format(PyExc_TypeError,
   31615             :                  "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
   31616             :                  obj_type_name);
   31617             :     __Pyx_DECREF_TypeName(obj_type_name);
   31618             :     return -1;
   31619             : }
   31620             : static void __Pyx_ReleaseBuffer(Py_buffer *view) {
   31621             :     PyObject *obj = view->obj;
   31622             :     if (!obj) return;
   31623             :     if (PyObject_CheckBuffer(obj)) {
   31624             :         PyBuffer_Release(view);
   31625             :         return;
   31626             :     }
   31627             :     if ((0)) {}
   31628             :     view->obj = NULL;
   31629             :     Py_DECREF(obj);
   31630             : }
   31631             : #endif
   31632             : 
   31633             : 
   31634             : /* MemviewSliceIsContig */
   31635             : static int
   31636           0 : __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
   31637             : {
   31638           0 :     int i, index, step, start;
   31639           0 :     Py_ssize_t itemsize = mvs.memview->view.itemsize;
   31640           0 :     if (order == 'F') {
   31641             :         step = 1;
   31642             :         start = 0;
   31643             :     } else {
   31644           0 :         step = -1;
   31645           0 :         start = ndim - 1;
   31646             :     }
   31647           0 :     for (i = 0; i < ndim; i++) {
   31648           0 :         index = start + step * i;
   31649           0 :         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
   31650             :             return 0;
   31651           0 :         itemsize *= mvs.shape[index];
   31652             :     }
   31653             :     return 1;
   31654             : }
   31655             : 
   31656             : /* OverlappingSlices */
   31657             : static void
   31658           0 : __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
   31659             :                                void **out_start, void **out_end,
   31660             :                                int ndim, size_t itemsize)
   31661             : {
   31662           0 :     char *start, *end;
   31663           0 :     int i;
   31664           0 :     start = end = slice->data;
   31665           0 :     for (i = 0; i < ndim; i++) {
   31666           0 :         Py_ssize_t stride = slice->strides[i];
   31667           0 :         Py_ssize_t extent = slice->shape[i];
   31668           0 :         if (extent == 0) {
   31669           0 :             *out_start = *out_end = start;
   31670           0 :             return;
   31671             :         } else {
   31672           0 :             if (stride > 0)
   31673           0 :                 end += stride * (extent - 1);
   31674             :             else
   31675           0 :                 start += stride * (extent - 1);
   31676             :         }
   31677             :     }
   31678           0 :     *out_start = start;
   31679           0 :     *out_end = end + itemsize;
   31680             : }
   31681             : static int
   31682           0 : __pyx_slices_overlap(__Pyx_memviewslice *slice1,
   31683             :                      __Pyx_memviewslice *slice2,
   31684             :                      int ndim, size_t itemsize)
   31685             : {
   31686           0 :     void *start1, *end1, *start2, *end2;
   31687           0 :     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
   31688           0 :     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
   31689           0 :     return (start1 < end2) && (start2 < end1);
   31690             : }
   31691             : 
   31692             : /* CIntFromPyVerify */
   31693             : #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
   31694             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
   31695             : #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
   31696             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
   31697             : #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
   31698             :     {\
   31699             :         func_type value = func_value;\
   31700             :         if (sizeof(target_type) < sizeof(func_type)) {\
   31701             :             if (unlikely(value != (func_type) (target_type) value)) {\
   31702             :                 func_type zero = 0;\
   31703             :                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
   31704             :                     return (target_type) -1;\
   31705             :                 if (is_unsigned && unlikely(value < zero))\
   31706             :                     goto raise_neg_overflow;\
   31707             :                 else\
   31708             :                     goto raise_overflow;\
   31709             :             }\
   31710             :         }\
   31711             :         return (target_type) value;\
   31712             :     }
   31713             : 
   31714             : /* IsLittleEndian */
   31715           0 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
   31716             : {
   31717           0 :   union {
   31718             :     uint32_t u32;
   31719             :     uint8_t u8[4];
   31720             :   } S;
   31721           0 :   S.u32 = 0x01020304;
   31722           0 :   return S.u8[0] == 4;
   31723             : }
   31724             : 
   31725             : /* BufferFormatCheck */
   31726         772 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
   31727             :                               __Pyx_BufFmt_StackElem* stack,
   31728             :                               __Pyx_TypeInfo* type) {
   31729         772 :   stack[0].field = &ctx->root;
   31730         772 :   stack[0].parent_offset = 0;
   31731         772 :   ctx->root.type = type;
   31732         772 :   ctx->root.name = "buffer dtype";
   31733         772 :   ctx->root.offset = 0;
   31734         772 :   ctx->head = stack;
   31735         772 :   ctx->head->field = &ctx->root;
   31736         772 :   ctx->fmt_offset = 0;
   31737         772 :   ctx->head->parent_offset = 0;
   31738         772 :   ctx->new_packmode = '@';
   31739         772 :   ctx->enc_packmode = '@';
   31740         772 :   ctx->new_count = 1;
   31741         772 :   ctx->enc_count = 0;
   31742         772 :   ctx->enc_type = 0;
   31743         772 :   ctx->is_complex = 0;
   31744         772 :   ctx->is_valid_array = 0;
   31745         772 :   ctx->struct_alignment = 0;
   31746         772 :   while (type->typegroup == 'S') {
   31747           0 :     ++ctx->head;
   31748           0 :     ctx->head->field = type->fields;
   31749           0 :     ctx->head->parent_offset = 0;
   31750           0 :     type = type->fields->type;
   31751             :   }
   31752         772 : }
   31753           0 : static int __Pyx_BufFmt_ParseNumber(const char** ts) {
   31754           0 :     int count;
   31755           0 :     const char* t = *ts;
   31756           0 :     if (*t < '0' || *t > '9') {
   31757             :       return -1;
   31758             :     } else {
   31759           0 :         count = *t++ - '0';
   31760           0 :         while (*t >= '0' && *t <= '9') {
   31761           0 :             count *= 10;
   31762           0 :             count += *t++ - '0';
   31763             :         }
   31764             :     }
   31765           0 :     *ts = t;
   31766           0 :     return count;
   31767             : }
   31768           0 : static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
   31769           0 :     int number = __Pyx_BufFmt_ParseNumber(ts);
   31770           0 :     if (number == -1)
   31771           0 :         PyErr_Format(PyExc_ValueError,\
   31772           0 :                      "Does not understand character buffer dtype format string ('%c')", **ts);
   31773           0 :     return number;
   31774             : }
   31775           0 : static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
   31776           0 :   PyErr_Format(PyExc_ValueError,
   31777             :                "Unexpected format string character: '%c'", ch);
   31778             : }
   31779           0 : static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
   31780           0 :   switch (ch) {
   31781             :     case '?': return "'bool'";
   31782           0 :     case 'c': return "'char'";
   31783           0 :     case 'b': return "'signed char'";
   31784           0 :     case 'B': return "'unsigned char'";
   31785           0 :     case 'h': return "'short'";
   31786           0 :     case 'H': return "'unsigned short'";
   31787           0 :     case 'i': return "'int'";
   31788           0 :     case 'I': return "'unsigned int'";
   31789           0 :     case 'l': return "'long'";
   31790           0 :     case 'L': return "'unsigned long'";
   31791           0 :     case 'q': return "'long long'";
   31792           0 :     case 'Q': return "'unsigned long long'";
   31793           0 :     case 'f': return (is_complex ? "'complex float'" : "'float'");
   31794           0 :     case 'd': return (is_complex ? "'complex double'" : "'double'");
   31795           0 :     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
   31796           0 :     case 'T': return "a struct";
   31797           0 :     case 'O': return "Python object";
   31798           0 :     case 'P': return "a pointer";
   31799           0 :     case 's': case 'p': return "a string";
   31800           0 :     case 0: return "end";
   31801           0 :     default: return "unparsable format string";
   31802             :   }
   31803             : }
   31804           0 : static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
   31805           0 :   switch (ch) {
   31806             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   31807           0 :     case 'h': case 'H': return 2;
   31808             :     case 'i': case 'I': case 'l': case 'L': return 4;
   31809             :     case 'q': case 'Q': return 8;
   31810           0 :     case 'f': return (is_complex ? 8 : 4);
   31811           0 :     case 'd': return (is_complex ? 16 : 8);
   31812           0 :     case 'g': {
   31813           0 :       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
   31814           0 :       return 0;
   31815             :     }
   31816             :     case 'O': case 'P': return sizeof(void*);
   31817           0 :     default:
   31818           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   31819           0 :       return 0;
   31820             :     }
   31821             : }
   31822         772 : static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
   31823         772 :   switch (ch) {
   31824             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   31825           0 :     case 'h': case 'H': return sizeof(short);
   31826             :     case 'i': case 'I': return sizeof(int);
   31827             :     case 'l': case 'L': return sizeof(long);
   31828             :     #ifdef HAVE_LONG_LONG
   31829             :     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
   31830             :     #endif
   31831           0 :     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
   31832         396 :     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
   31833           0 :     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
   31834             :     case 'O': case 'P': return sizeof(void*);
   31835           0 :     default: {
   31836           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   31837           0 :       return 0;
   31838             :     }
   31839             :   }
   31840             : }
   31841             : typedef struct { char c; short x; } __Pyx_st_short;
   31842             : typedef struct { char c; int x; } __Pyx_st_int;
   31843             : typedef struct { char c; long x; } __Pyx_st_long;
   31844             : typedef struct { char c; float x; } __Pyx_st_float;
   31845             : typedef struct { char c; double x; } __Pyx_st_double;
   31846             : typedef struct { char c; long double x; } __Pyx_st_longdouble;
   31847             : typedef struct { char c; void *x; } __Pyx_st_void_p;
   31848             : #ifdef HAVE_LONG_LONG
   31849             : typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
   31850             : #endif
   31851         772 : static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
   31852         772 :   CYTHON_UNUSED_VAR(is_complex);
   31853         772 :   switch (ch) {
   31854             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   31855           0 :     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
   31856             :     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
   31857             :     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
   31858             : #ifdef HAVE_LONG_LONG
   31859             :     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
   31860             : #endif
   31861             :     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
   31862             :     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
   31863           0 :     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
   31864             :     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
   31865           0 :     default:
   31866           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   31867           0 :       return 0;
   31868             :     }
   31869             : }
   31870             : /* These are for computing the padding at the end of the struct to align
   31871             :    on the first member of the struct. This will probably the same as above,
   31872             :    but we don't have any guarantees.
   31873             :  */
   31874             : typedef struct { short x; char c; } __Pyx_pad_short;
   31875             : typedef struct { int x; char c; } __Pyx_pad_int;
   31876             : typedef struct { long x; char c; } __Pyx_pad_long;
   31877             : typedef struct { float x; char c; } __Pyx_pad_float;
   31878             : typedef struct { double x; char c; } __Pyx_pad_double;
   31879             : typedef struct { long double x; char c; } __Pyx_pad_longdouble;
   31880             : typedef struct { void *x; char c; } __Pyx_pad_void_p;
   31881             : #ifdef HAVE_LONG_LONG
   31882             : typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
   31883             : #endif
   31884         772 : static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
   31885         772 :   CYTHON_UNUSED_VAR(is_complex);
   31886         772 :   switch (ch) {
   31887             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   31888           0 :     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
   31889             :     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
   31890             :     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
   31891             : #ifdef HAVE_LONG_LONG
   31892             :     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
   31893             : #endif
   31894             :     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
   31895             :     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
   31896           0 :     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
   31897             :     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
   31898           0 :     default:
   31899           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   31900           0 :       return 0;
   31901             :     }
   31902             : }
   31903         772 : static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
   31904         772 :   switch (ch) {
   31905             :     case 'c':
   31906             :         return 'H';
   31907         376 :     case 'b': case 'h': case 'i':
   31908             :     case 'l': case 'q': case 's': case 'p':
   31909         376 :         return 'I';
   31910           0 :     case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
   31911           0 :         return 'U';
   31912         396 :     case 'f': case 'd': case 'g':
   31913         396 :         return (is_complex ? 'C' : 'R');
   31914           0 :     case 'O':
   31915           0 :         return 'O';
   31916           0 :     case 'P':
   31917           0 :         return 'P';
   31918           0 :     default: {
   31919           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   31920           0 :       return 0;
   31921             :     }
   31922             :   }
   31923             : }
   31924           0 : static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
   31925           0 :   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
   31926           0 :     const char* expected;
   31927           0 :     const char* quote;
   31928           0 :     if (ctx->head == NULL) {
   31929             :       expected = "end";
   31930             :       quote = "";
   31931             :     } else {
   31932           0 :       expected = ctx->head->field->type->name;
   31933           0 :       quote = "'";
   31934             :     }
   31935           0 :     PyErr_Format(PyExc_ValueError,
   31936             :                  "Buffer dtype mismatch, expected %s%s%s but got %s",
   31937             :                  quote, expected, quote,
   31938           0 :                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
   31939             :   } else {
   31940           0 :     __Pyx_StructField* field = ctx->head->field;
   31941           0 :     __Pyx_StructField* parent = (ctx->head - 1)->field;
   31942           0 :     PyErr_Format(PyExc_ValueError,
   31943             :                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
   31944           0 :                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
   31945           0 :                  parent->type->name, field->name);
   31946             :   }
   31947           0 : }
   31948        1544 : static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
   31949        1544 :   char group;
   31950        1544 :   size_t size, offset, arraysize = 1;
   31951        1544 :   if (ctx->enc_type == 0) return 0;
   31952         772 :   if (ctx->head->field->type->arraysize[0]) {
   31953           0 :     int i, ndim = 0;
   31954           0 :     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
   31955           0 :         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
   31956           0 :         ndim = 1;
   31957           0 :         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
   31958           0 :             PyErr_Format(PyExc_ValueError,
   31959             :                          "Expected a dimension of size %zu, got %zu",
   31960             :                          ctx->head->field->type->arraysize[0], ctx->enc_count);
   31961           0 :             return -1;
   31962             :         }
   31963             :     }
   31964           0 :     if (!ctx->is_valid_array) {
   31965           0 :       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
   31966             :                    ctx->head->field->type->ndim, ndim);
   31967           0 :       return -1;
   31968             :     }
   31969           0 :     for (i = 0; i < ctx->head->field->type->ndim; i++) {
   31970           0 :       arraysize *= ctx->head->field->type->arraysize[i];
   31971             :     }
   31972           0 :     ctx->is_valid_array = 0;
   31973           0 :     ctx->enc_count = 1;
   31974             :   }
   31975         772 :   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
   31976         772 :   do {
   31977         772 :     __Pyx_StructField* field = ctx->head->field;
   31978         772 :     __Pyx_TypeInfo* type = field->type;
   31979         772 :     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
   31980         772 :       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
   31981             :     } else {
   31982           0 :       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
   31983             :     }
   31984         772 :     if (ctx->enc_packmode == '@') {
   31985         772 :       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
   31986         772 :       size_t align_mod_offset;
   31987         772 :       if (align_at == 0) return -1;
   31988         772 :       align_mod_offset = ctx->fmt_offset % align_at;
   31989         772 :       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
   31990         772 :       if (ctx->struct_alignment == 0)
   31991         772 :           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
   31992             :                                                                  ctx->is_complex);
   31993             :     }
   31994         772 :     if (type->size != size || type->typegroup != group) {
   31995           0 :       if (type->typegroup == 'C' && type->fields != NULL) {
   31996           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   31997           0 :         ++ctx->head;
   31998           0 :         ctx->head->field = type->fields;
   31999           0 :         ctx->head->parent_offset = parent_offset;
   32000           0 :         continue;
   32001             :       }
   32002           0 :       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
   32003             :       } else {
   32004           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   32005           0 :           return -1;
   32006             :       }
   32007             :     }
   32008         772 :     offset = ctx->head->parent_offset + field->offset;
   32009         772 :     if (ctx->fmt_offset != offset) {
   32010           0 :       PyErr_Format(PyExc_ValueError,
   32011             :                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
   32012             :                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
   32013           0 :       return -1;
   32014             :     }
   32015         772 :     ctx->fmt_offset += size;
   32016         772 :     if (arraysize)
   32017         772 :       ctx->fmt_offset += (arraysize - 1) * size;
   32018         772 :     --ctx->enc_count;
   32019         772 :     while (1) {
   32020         772 :       if (field == &ctx->root) {
   32021         772 :         ctx->head = NULL;
   32022         772 :         if (ctx->enc_count != 0) {
   32023           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   32024           0 :           return -1;
   32025             :         }
   32026             :         break;
   32027             :       }
   32028           0 :       ctx->head->field = ++field;
   32029           0 :       if (field->type == NULL) {
   32030           0 :         --ctx->head;
   32031           0 :         field = ctx->head->field;
   32032           0 :         continue;
   32033           0 :       } else if (field->type->typegroup == 'S') {
   32034           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   32035           0 :         if (field->type->fields->type == NULL) continue;
   32036           0 :         field = field->type->fields;
   32037           0 :         ++ctx->head;
   32038           0 :         ctx->head->field = field;
   32039           0 :         ctx->head->parent_offset = parent_offset;
   32040           0 :         break;
   32041             :       } else {
   32042             :         break;
   32043             :       }
   32044             :     }
   32045         772 :   } while (ctx->enc_count);
   32046         772 :   ctx->enc_type = 0;
   32047         772 :   ctx->is_complex = 0;
   32048         772 :   return 0;
   32049             : }
   32050             : static int
   32051           0 : __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
   32052             : {
   32053           0 :     const char *ts = *tsp;
   32054           0 :     int i = 0, number, ndim;
   32055           0 :     ++ts;
   32056           0 :     if (ctx->new_count != 1) {
   32057           0 :         PyErr_SetString(PyExc_ValueError,
   32058             :                         "Cannot handle repeated arrays in format string");
   32059           0 :         return -1;
   32060             :     }
   32061           0 :     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
   32062           0 :     ndim = ctx->head->field->type->ndim;
   32063           0 :     while (*ts && *ts != ')') {
   32064           0 :         switch (*ts) {
   32065           0 :             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
   32066           0 :             default:  break;
   32067             :         }
   32068           0 :         number = __Pyx_BufFmt_ExpectNumber(&ts);
   32069           0 :         if (number == -1) return -1;
   32070           0 :         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
   32071           0 :             PyErr_Format(PyExc_ValueError,
   32072             :                         "Expected a dimension of size %zu, got %d",
   32073             :                         ctx->head->field->type->arraysize[i], number);
   32074           0 :             return -1;
   32075             :         }
   32076           0 :         if (*ts != ',' && *ts != ')') {
   32077           0 :             PyErr_Format(PyExc_ValueError,
   32078             :                                 "Expected a comma in format string, got '%c'", *ts);
   32079           0 :             return -1;
   32080             :         }
   32081           0 :         if (*ts == ',') ts++;
   32082           0 :         i++;
   32083             :     }
   32084           0 :     if (i != ndim) {
   32085           0 :         PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
   32086           0 :                             ctx->head->field->type->ndim, i);
   32087           0 :         return -1;
   32088             :     }
   32089           0 :     if (!*ts) {
   32090           0 :         PyErr_SetString(PyExc_ValueError,
   32091             :                         "Unexpected end of format string, expected ')'");
   32092           0 :         return -1;
   32093             :     }
   32094           0 :     ctx->is_valid_array = 1;
   32095           0 :     ctx->new_count = 1;
   32096           0 :     *tsp = ++ts;
   32097           0 :     return 0;
   32098             : }
   32099         772 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
   32100         772 :   int got_Z = 0;
   32101        1544 :   while (1) {
   32102        1544 :     switch(*ts) {
   32103         772 :       case 0:
   32104         772 :         if (ctx->enc_type != 0 && ctx->head == NULL) {
   32105           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   32106           0 :           return NULL;
   32107             :         }
   32108         772 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   32109         772 :         if (ctx->head != NULL) {
   32110           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   32111           0 :           return NULL;
   32112             :         }
   32113             :         return ts;
   32114           0 :       case ' ':
   32115             :       case '\r':
   32116             :       case '\n':
   32117           0 :         ++ts;
   32118           0 :         break;
   32119             :       case '<':
   32120           0 :         if (!__Pyx_Is_Little_Endian()) {
   32121             :           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
   32122             :           return NULL;
   32123             :         }
   32124           0 :         ctx->new_packmode = '=';
   32125           0 :         ++ts;
   32126           0 :         break;
   32127             :       case '>':
   32128             :       case '!':
   32129           0 :         if (__Pyx_Is_Little_Endian()) {
   32130           0 :           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
   32131           0 :           return NULL;
   32132             :         }
   32133             :         ctx->new_packmode = '=';
   32134             :         ++ts;
   32135             :         break;
   32136           0 :       case '=':
   32137             :       case '@':
   32138             :       case '^':
   32139           0 :         ctx->new_packmode = *ts++;
   32140           0 :         break;
   32141           0 :       case 'T':
   32142             :         {
   32143           0 :           const char* ts_after_sub;
   32144           0 :           size_t i, struct_count = ctx->new_count;
   32145           0 :           size_t struct_alignment = ctx->struct_alignment;
   32146           0 :           ctx->new_count = 1;
   32147           0 :           ++ts;
   32148           0 :           if (*ts != '{') {
   32149           0 :             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
   32150           0 :             return NULL;
   32151             :           }
   32152           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   32153           0 :           ctx->enc_type = 0;
   32154           0 :           ctx->enc_count = 0;
   32155           0 :           ctx->struct_alignment = 0;
   32156           0 :           ++ts;
   32157           0 :           ts_after_sub = ts;
   32158           0 :           for (i = 0; i != struct_count; ++i) {
   32159           0 :             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
   32160           0 :             if (!ts_after_sub) return NULL;
   32161             :           }
   32162           0 :           ts = ts_after_sub;
   32163           0 :           if (struct_alignment) ctx->struct_alignment = struct_alignment;
   32164             :         }
   32165             :         break;
   32166           0 :       case '}':
   32167             :         {
   32168           0 :           size_t alignment = ctx->struct_alignment;
   32169           0 :           ++ts;
   32170           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   32171           0 :           ctx->enc_type = 0;
   32172           0 :           if (alignment && ctx->fmt_offset % alignment) {
   32173           0 :             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
   32174             :           }
   32175             :         }
   32176             :         return ts;
   32177           0 :       case 'x':
   32178           0 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   32179           0 :         ctx->fmt_offset += ctx->new_count;
   32180           0 :         ctx->new_count = 1;
   32181           0 :         ctx->enc_count = 0;
   32182           0 :         ctx->enc_type = 0;
   32183           0 :         ctx->enc_packmode = ctx->new_packmode;
   32184           0 :         ++ts;
   32185           0 :         break;
   32186           0 :       case 'Z':
   32187           0 :         got_Z = 1;
   32188           0 :         ++ts;
   32189           0 :         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
   32190           0 :           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
   32191           0 :           return NULL;
   32192             :         }
   32193         772 :         CYTHON_FALLTHROUGH;
   32194             :       case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
   32195             :       case 'l': case 'L': case 'q': case 'Q':
   32196             :       case 'f': case 'd': case 'g':
   32197             :       case 'O': case 'p':
   32198         772 :         if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
   32199           0 :             (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
   32200           0 :           ctx->enc_count += ctx->new_count;
   32201           0 :           ctx->new_count = 1;
   32202           0 :           got_Z = 0;
   32203           0 :           ++ts;
   32204           0 :           break;
   32205             :         }
   32206         772 :         CYTHON_FALLTHROUGH;
   32207             :       case 's':
   32208         772 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   32209         772 :         ctx->enc_count = ctx->new_count;
   32210         772 :         ctx->enc_packmode = ctx->new_packmode;
   32211         772 :         ctx->enc_type = *ts;
   32212         772 :         ctx->is_complex = got_Z;
   32213         772 :         ++ts;
   32214         772 :         ctx->new_count = 1;
   32215         772 :         got_Z = 0;
   32216         772 :         break;
   32217           0 :       case ':':
   32218           0 :         ++ts;
   32219           0 :         while(*ts != ':') ++ts;
   32220           0 :         ++ts;
   32221           0 :         break;
   32222           0 :       case '(':
   32223           0 :         if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
   32224             :         break;
   32225           0 :       default:
   32226             :         {
   32227           0 :           int number = __Pyx_BufFmt_ExpectNumber(&ts);
   32228           0 :           if (number == -1) return NULL;
   32229           0 :           ctx->new_count = (size_t)number;
   32230             :         }
   32231             :     }
   32232             :   }
   32233             : }
   32234             : 
   32235             : /* TypeInfoCompare */
   32236             :   static int
   32237           0 : __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
   32238             : {
   32239           0 :     int i;
   32240           0 :     if (!a || !b)
   32241             :         return 0;
   32242           0 :     if (a == b)
   32243             :         return 1;
   32244           0 :     if (a->size != b->size || a->typegroup != b->typegroup ||
   32245           0 :             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
   32246           0 :         if (a->typegroup == 'H' || b->typegroup == 'H') {
   32247           0 :             return a->size == b->size;
   32248             :         } else {
   32249             :             return 0;
   32250             :         }
   32251             :     }
   32252           0 :     if (a->ndim) {
   32253           0 :         for (i = 0; i < a->ndim; i++)
   32254           0 :             if (a->arraysize[i] != b->arraysize[i])
   32255             :                 return 0;
   32256             :     }
   32257           0 :     if (a->typegroup == 'S') {
   32258           0 :         if (a->flags != b->flags)
   32259             :             return 0;
   32260           0 :         if (a->fields || b->fields) {
   32261           0 :             if (!(a->fields && b->fields))
   32262             :                 return 0;
   32263           0 :             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
   32264           0 :                 __Pyx_StructField *field_a = a->fields + i;
   32265           0 :                 __Pyx_StructField *field_b = b->fields + i;
   32266           0 :                 if (field_a->offset != field_b->offset ||
   32267           0 :                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
   32268           0 :                     return 0;
   32269             :             }
   32270           0 :             return !a->fields[i].type && !b->fields[i].type;
   32271             :         }
   32272             :     }
   32273             :     return 1;
   32274             : }
   32275             : 
   32276             : /* MemviewSliceValidateAndInit */
   32277             :   static int
   32278         584 : __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
   32279             : {
   32280         584 :     if (buf->shape[dim] <= 1)
   32281             :         return 1;
   32282         584 :     if (buf->strides) {
   32283         584 :         if (spec & __Pyx_MEMVIEW_CONTIG) {
   32284           0 :             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
   32285           0 :                 if (unlikely(buf->strides[dim] != sizeof(void *))) {
   32286           0 :                     PyErr_Format(PyExc_ValueError,
   32287             :                                  "Buffer is not indirectly contiguous "
   32288             :                                  "in dimension %d.", dim);
   32289           0 :                     goto fail;
   32290             :                 }
   32291           0 :             } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
   32292           0 :                 PyErr_SetString(PyExc_ValueError,
   32293             :                                 "Buffer and memoryview are not contiguous "
   32294             :                                 "in the same dimension.");
   32295           0 :                 goto fail;
   32296             :             }
   32297             :         }
   32298         584 :         if (spec & __Pyx_MEMVIEW_FOLLOW) {
   32299           0 :             Py_ssize_t stride = buf->strides[dim];
   32300           0 :             if (stride < 0)
   32301             :                 stride = -stride;
   32302           0 :             if (unlikely(stride < buf->itemsize)) {
   32303           0 :                 PyErr_SetString(PyExc_ValueError,
   32304             :                                 "Buffer and memoryview are not contiguous "
   32305             :                                 "in the same dimension.");
   32306           0 :                 goto fail;
   32307             :             }
   32308             :         }
   32309             :     } else {
   32310           0 :         if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
   32311           0 :             PyErr_Format(PyExc_ValueError,
   32312             :                          "C-contiguous buffer is not contiguous in "
   32313             :                          "dimension %d", dim);
   32314           0 :             goto fail;
   32315           0 :         } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
   32316           0 :             PyErr_Format(PyExc_ValueError,
   32317             :                          "C-contiguous buffer is not indirect in "
   32318             :                          "dimension %d", dim);
   32319           0 :             goto fail;
   32320           0 :         } else if (unlikely(buf->suboffsets)) {
   32321           0 :             PyErr_SetString(PyExc_ValueError,
   32322             :                             "Buffer exposes suboffsets but no strides");
   32323           0 :             goto fail;
   32324             :         }
   32325             :     }
   32326             :     return 1;
   32327             : fail:
   32328             :     return 0;
   32329             : }
   32330             : static int
   32331         584 : __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
   32332             : {
   32333         584 :     CYTHON_UNUSED_VAR(ndim);
   32334         584 :     if (spec & __Pyx_MEMVIEW_DIRECT) {
   32335         584 :         if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
   32336           0 :             PyErr_Format(PyExc_ValueError,
   32337             :                          "Buffer not compatible with direct access "
   32338             :                          "in dimension %d.", dim);
   32339           0 :             goto fail;
   32340             :         }
   32341             :     }
   32342         584 :     if (spec & __Pyx_MEMVIEW_PTR) {
   32343           0 :         if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
   32344           0 :             PyErr_Format(PyExc_ValueError,
   32345             :                          "Buffer is not indirectly accessible "
   32346             :                          "in dimension %d.", dim);
   32347           0 :             goto fail;
   32348             :         }
   32349             :     }
   32350             :     return 1;
   32351             : fail:
   32352             :     return 0;
   32353             : }
   32354             : static int
   32355         584 : __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
   32356             : {
   32357         584 :     int i;
   32358         584 :     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
   32359             :         Py_ssize_t stride = 1;
   32360           0 :         for (i = 0; i < ndim; i++) {
   32361           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   32362           0 :                 PyErr_SetString(PyExc_ValueError,
   32363             :                     "Buffer not fortran contiguous.");
   32364           0 :                 goto fail;
   32365             :             }
   32366           0 :             stride = stride * buf->shape[i];
   32367             :         }
   32368         584 :     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
   32369           0 :         Py_ssize_t stride = 1;
   32370           0 :         for (i = ndim - 1; i >- 1; i--) {
   32371           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   32372           0 :                 PyErr_SetString(PyExc_ValueError,
   32373             :                     "Buffer not C contiguous.");
   32374           0 :                 goto fail;
   32375             :             }
   32376           0 :             stride = stride * buf->shape[i];
   32377             :         }
   32378             :     }
   32379             :     return 1;
   32380             : fail:
   32381             :     return 0;
   32382             : }
   32383         772 : static int __Pyx_ValidateAndInit_memviewslice(
   32384             :                 int *axes_specs,
   32385             :                 int c_or_f_flag,
   32386             :                 int buf_flags,
   32387             :                 int ndim,
   32388             :                 __Pyx_TypeInfo *dtype,
   32389             :                 __Pyx_BufFmt_StackElem stack[],
   32390             :                 __Pyx_memviewslice *memviewslice,
   32391             :                 PyObject *original_obj)
   32392             : {
   32393         772 :     struct __pyx_memoryview_obj *memview, *new_memview;
   32394             :     __Pyx_RefNannyDeclarations
   32395         772 :     Py_buffer *buf;
   32396         772 :     int i, spec = 0, retval = -1;
   32397         772 :     __Pyx_BufFmt_Context ctx;
   32398         772 :     int from_memoryview = __pyx_memoryview_check(original_obj);
   32399         772 :     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
   32400         772 :     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
   32401             :                                                             original_obj)->typeinfo)) {
   32402             :         memview = (struct __pyx_memoryview_obj *) original_obj;
   32403             :         new_memview = NULL;
   32404             :     } else {
   32405         772 :         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   32406             :                                             original_obj, buf_flags, 0, dtype);
   32407         772 :         new_memview = memview;
   32408         772 :         if (unlikely(!memview))
   32409           0 :             goto fail;
   32410             :     }
   32411         772 :     buf = &memview->view;
   32412         772 :     if (unlikely(buf->ndim != ndim)) {
   32413           0 :         PyErr_Format(PyExc_ValueError,
   32414             :                 "Buffer has wrong number of dimensions (expected %d, got %d)",
   32415             :                 ndim, buf->ndim);
   32416           0 :         goto fail;
   32417             :     }
   32418         772 :     if (new_memview) {
   32419         772 :         __Pyx_BufFmt_Init(&ctx, stack, dtype);
   32420         772 :         if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
   32421             :     }
   32422         772 :     if (unlikely((unsigned) buf->itemsize != dtype->size)) {
   32423           0 :         PyErr_Format(PyExc_ValueError,
   32424             :                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
   32425             :                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
   32426             :                      buf->itemsize,
   32427             :                      (buf->itemsize > 1) ? "s" : "",
   32428             :                      dtype->name,
   32429             :                      dtype->size,
   32430             :                      (dtype->size > 1) ? "s" : "");
   32431           0 :         goto fail;
   32432             :     }
   32433         772 :     if (buf->len > 0) {
   32434        1168 :         for (i = 0; i < ndim; i++) {
   32435         584 :             spec = axes_specs[i];
   32436         584 :             if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
   32437           0 :                 goto fail;
   32438         584 :             if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
   32439           0 :                 goto fail;
   32440             :         }
   32441         584 :         if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
   32442           0 :             goto fail;
   32443             :     }
   32444         772 :     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
   32445             :                                          new_memview != NULL) == -1)) {
   32446           0 :         goto fail;
   32447             :     }
   32448         772 :     retval = 0;
   32449         772 :     goto no_fail;
   32450           0 : fail:
   32451           0 :     Py_XDECREF(new_memview);
   32452           0 :     retval = -1;
   32453         772 : no_fail:
   32454         772 :     __Pyx_RefNannyFinishContext();
   32455         772 :     return retval;
   32456             : }
   32457             : 
   32458             : /* ObjectToMemviewSlice */
   32459         396 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
   32460         396 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   32461         396 :     __Pyx_BufFmt_StackElem stack[1];
   32462         396 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   32463         396 :     int retcode;
   32464         396 :     if (obj == Py_None) {
   32465           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   32466           0 :         return result;
   32467             :     }
   32468         396 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   32469             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   32470             :                                                  &__Pyx_TypeInfo_double, stack,
   32471             :                                                  &result, obj);
   32472         396 :     if (unlikely(retcode == -1))
   32473           0 :         goto __pyx_fail;
   32474         396 :     return result;
   32475           0 : __pyx_fail:
   32476           0 :     result.memview = NULL;
   32477           0 :     result.data = NULL;
   32478           0 :     return result;
   32479             : }
   32480             : 
   32481             : /* ObjectToMemviewSlice */
   32482         376 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long(PyObject *obj, int writable_flag) {
   32483         376 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   32484         376 :     __Pyx_BufFmt_StackElem stack[1];
   32485         376 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   32486         376 :     int retcode;
   32487         376 :     if (obj == Py_None) {
   32488           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   32489           0 :         return result;
   32490             :     }
   32491         376 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   32492             :                                                  PyBUF_RECORDS_RO | writable_flag, 1,
   32493             :                                                  &__Pyx_TypeInfo_long, stack,
   32494             :                                                  &result, obj);
   32495         376 :     if (unlikely(retcode == -1))
   32496           0 :         goto __pyx_fail;
   32497         376 :     return result;
   32498           0 : __pyx_fail:
   32499           0 :     result.memview = NULL;
   32500           0 :     result.data = NULL;
   32501           0 :     return result;
   32502             : }
   32503             : 
   32504             : /* Declarations */
   32505             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32506             :   #ifdef __cplusplus
   32507             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32508             :       return ::std::complex< float >(x, y);
   32509             :     }
   32510             :   #else
   32511             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32512             :       return x + y*(__pyx_t_float_complex)_Complex_I;
   32513             :     }
   32514             :   #endif
   32515             : #else
   32516             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32517             :       __pyx_t_float_complex z;
   32518             :       z.real = x;
   32519             :       z.imag = y;
   32520             :       return z;
   32521             :     }
   32522             : #endif
   32523             : 
   32524             : /* Arithmetic */
   32525             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32526             : #else
   32527             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32528             :        return (a.real == b.real) && (a.imag == b.imag);
   32529             :     }
   32530             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32531             :         __pyx_t_float_complex z;
   32532             :         z.real = a.real + b.real;
   32533             :         z.imag = a.imag + b.imag;
   32534             :         return z;
   32535             :     }
   32536             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32537             :         __pyx_t_float_complex z;
   32538             :         z.real = a.real - b.real;
   32539             :         z.imag = a.imag - b.imag;
   32540             :         return z;
   32541             :     }
   32542             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32543             :         __pyx_t_float_complex z;
   32544             :         z.real = a.real * b.real - a.imag * b.imag;
   32545             :         z.imag = a.real * b.imag + a.imag * b.real;
   32546             :         return z;
   32547             :     }
   32548             :     #if 1
   32549             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32550             :         if (b.imag == 0) {
   32551             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   32552             :         } else if (fabsf(b.real) >= fabsf(b.imag)) {
   32553             :             if (b.real == 0 && b.imag == 0) {
   32554             :                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32555             :             } else {
   32556             :                 float r = b.imag / b.real;
   32557             :                 float s = (float)(1.0) / (b.real + b.imag * r);
   32558             :                 return __pyx_t_float_complex_from_parts(
   32559             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32560             :             }
   32561             :         } else {
   32562             :             float r = b.real / b.imag;
   32563             :             float s = (float)(1.0) / (b.imag + b.real * r);
   32564             :             return __pyx_t_float_complex_from_parts(
   32565             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32566             :         }
   32567             :     }
   32568             :     #else
   32569             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32570             :         if (b.imag == 0) {
   32571             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   32572             :         } else {
   32573             :             float denom = b.real * b.real + b.imag * b.imag;
   32574             :             return __pyx_t_float_complex_from_parts(
   32575             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32576             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32577             :         }
   32578             :     }
   32579             :     #endif
   32580             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
   32581             :         __pyx_t_float_complex z;
   32582             :         z.real = -a.real;
   32583             :         z.imag = -a.imag;
   32584             :         return z;
   32585             :     }
   32586             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
   32587             :        return (a.real == 0) && (a.imag == 0);
   32588             :     }
   32589             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
   32590             :         __pyx_t_float_complex z;
   32591             :         z.real =  a.real;
   32592             :         z.imag = -a.imag;
   32593             :         return z;
   32594             :     }
   32595             :     #if 1
   32596             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
   32597             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32598             :             return sqrtf(z.real*z.real + z.imag*z.imag);
   32599             :           #else
   32600             :             return hypotf(z.real, z.imag);
   32601             :           #endif
   32602             :         }
   32603             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32604             :             __pyx_t_float_complex z;
   32605             :             float r, lnr, theta, z_r, z_theta;
   32606             :             if (b.imag == 0 && b.real == (int)b.real) {
   32607             :                 if (b.real < 0) {
   32608             :                     float denom = a.real * a.real + a.imag * a.imag;
   32609             :                     a.real = a.real / denom;
   32610             :                     a.imag = -a.imag / denom;
   32611             :                     b.real = -b.real;
   32612             :                 }
   32613             :                 switch ((int)b.real) {
   32614             :                     case 0:
   32615             :                         z.real = 1;
   32616             :                         z.imag = 0;
   32617             :                         return z;
   32618             :                     case 1:
   32619             :                         return a;
   32620             :                     case 2:
   32621             :                         return __Pyx_c_prod_float(a, a);
   32622             :                     case 3:
   32623             :                         z = __Pyx_c_prod_float(a, a);
   32624             :                         return __Pyx_c_prod_float(z, a);
   32625             :                     case 4:
   32626             :                         z = __Pyx_c_prod_float(a, a);
   32627             :                         return __Pyx_c_prod_float(z, z);
   32628             :                 }
   32629             :             }
   32630             :             if (a.imag == 0) {
   32631             :                 if (a.real == 0) {
   32632             :                     return a;
   32633             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32634             :                     z.real = powf(a.real, b.real);
   32635             :                     z.imag = 0;
   32636             :                     return z;
   32637             :                 } else if (a.real > 0) {
   32638             :                     r = a.real;
   32639             :                     theta = 0;
   32640             :                 } else {
   32641             :                     r = -a.real;
   32642             :                     theta = atan2f(0.0, -1.0);
   32643             :                 }
   32644             :             } else {
   32645             :                 r = __Pyx_c_abs_float(a);
   32646             :                 theta = atan2f(a.imag, a.real);
   32647             :             }
   32648             :             lnr = logf(r);
   32649             :             z_r = expf(lnr * b.real - theta * b.imag);
   32650             :             z_theta = theta * b.real + lnr * b.imag;
   32651             :             z.real = z_r * cosf(z_theta);
   32652             :             z.imag = z_r * sinf(z_theta);
   32653             :             return z;
   32654             :         }
   32655             :     #endif
   32656             : #endif
   32657             : 
   32658             : /* Declarations */
   32659             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32660             :   #ifdef __cplusplus
   32661             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32662             :       return ::std::complex< double >(x, y);
   32663             :     }
   32664             :   #else
   32665             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32666             :       return x + y*(__pyx_t_double_complex)_Complex_I;
   32667             :     }
   32668             :   #endif
   32669             : #else
   32670             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32671             :       __pyx_t_double_complex z;
   32672             :       z.real = x;
   32673             :       z.imag = y;
   32674             :       return z;
   32675             :     }
   32676             : #endif
   32677             : 
   32678             : /* Arithmetic */
   32679             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32680             : #else
   32681             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32682             :        return (a.real == b.real) && (a.imag == b.imag);
   32683             :     }
   32684             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32685             :         __pyx_t_double_complex z;
   32686             :         z.real = a.real + b.real;
   32687             :         z.imag = a.imag + b.imag;
   32688             :         return z;
   32689             :     }
   32690             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32691             :         __pyx_t_double_complex z;
   32692             :         z.real = a.real - b.real;
   32693             :         z.imag = a.imag - b.imag;
   32694             :         return z;
   32695             :     }
   32696             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32697             :         __pyx_t_double_complex z;
   32698             :         z.real = a.real * b.real - a.imag * b.imag;
   32699             :         z.imag = a.real * b.imag + a.imag * b.real;
   32700             :         return z;
   32701             :     }
   32702             :     #if 1
   32703             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32704             :         if (b.imag == 0) {
   32705             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32706             :         } else if (fabs(b.real) >= fabs(b.imag)) {
   32707             :             if (b.real == 0 && b.imag == 0) {
   32708             :                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32709             :             } else {
   32710             :                 double r = b.imag / b.real;
   32711             :                 double s = (double)(1.0) / (b.real + b.imag * r);
   32712             :                 return __pyx_t_double_complex_from_parts(
   32713             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32714             :             }
   32715             :         } else {
   32716             :             double r = b.real / b.imag;
   32717             :             double s = (double)(1.0) / (b.imag + b.real * r);
   32718             :             return __pyx_t_double_complex_from_parts(
   32719             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32720             :         }
   32721             :     }
   32722             :     #else
   32723             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32724             :         if (b.imag == 0) {
   32725             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32726             :         } else {
   32727             :             double denom = b.real * b.real + b.imag * b.imag;
   32728             :             return __pyx_t_double_complex_from_parts(
   32729             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32730             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32731             :         }
   32732             :     }
   32733             :     #endif
   32734             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
   32735             :         __pyx_t_double_complex z;
   32736             :         z.real = -a.real;
   32737             :         z.imag = -a.imag;
   32738             :         return z;
   32739             :     }
   32740             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
   32741             :        return (a.real == 0) && (a.imag == 0);
   32742             :     }
   32743             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
   32744             :         __pyx_t_double_complex z;
   32745             :         z.real =  a.real;
   32746             :         z.imag = -a.imag;
   32747             :         return z;
   32748             :     }
   32749             :     #if 1
   32750             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
   32751             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32752             :             return sqrt(z.real*z.real + z.imag*z.imag);
   32753             :           #else
   32754             :             return hypot(z.real, z.imag);
   32755             :           #endif
   32756             :         }
   32757             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32758             :             __pyx_t_double_complex z;
   32759             :             double r, lnr, theta, z_r, z_theta;
   32760             :             if (b.imag == 0 && b.real == (int)b.real) {
   32761             :                 if (b.real < 0) {
   32762             :                     double denom = a.real * a.real + a.imag * a.imag;
   32763             :                     a.real = a.real / denom;
   32764             :                     a.imag = -a.imag / denom;
   32765             :                     b.real = -b.real;
   32766             :                 }
   32767             :                 switch ((int)b.real) {
   32768             :                     case 0:
   32769             :                         z.real = 1;
   32770             :                         z.imag = 0;
   32771             :                         return z;
   32772             :                     case 1:
   32773             :                         return a;
   32774             :                     case 2:
   32775             :                         return __Pyx_c_prod_double(a, a);
   32776             :                     case 3:
   32777             :                         z = __Pyx_c_prod_double(a, a);
   32778             :                         return __Pyx_c_prod_double(z, a);
   32779             :                     case 4:
   32780             :                         z = __Pyx_c_prod_double(a, a);
   32781             :                         return __Pyx_c_prod_double(z, z);
   32782             :                 }
   32783             :             }
   32784             :             if (a.imag == 0) {
   32785             :                 if (a.real == 0) {
   32786             :                     return a;
   32787             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32788             :                     z.real = pow(a.real, b.real);
   32789             :                     z.imag = 0;
   32790             :                     return z;
   32791             :                 } else if (a.real > 0) {
   32792             :                     r = a.real;
   32793             :                     theta = 0;
   32794             :                 } else {
   32795             :                     r = -a.real;
   32796             :                     theta = atan2(0.0, -1.0);
   32797             :                 }
   32798             :             } else {
   32799             :                 r = __Pyx_c_abs_double(a);
   32800             :                 theta = atan2(a.imag, a.real);
   32801             :             }
   32802             :             lnr = log(r);
   32803             :             z_r = exp(lnr * b.real - theta * b.imag);
   32804             :             z_theta = theta * b.real + lnr * b.imag;
   32805             :             z.real = z_r * cos(z_theta);
   32806             :             z.imag = z_r * sin(z_theta);
   32807             :             return z;
   32808             :         }
   32809             :     #endif
   32810             : #endif
   32811             : 
   32812             : /* Declarations */
   32813             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32814             :   #ifdef __cplusplus
   32815             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32816             :       return ::std::complex< long double >(x, y);
   32817             :     }
   32818             :   #else
   32819             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32820             :       return x + y*(__pyx_t_long_double_complex)_Complex_I;
   32821             :     }
   32822             :   #endif
   32823             : #else
   32824             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32825             :       __pyx_t_long_double_complex z;
   32826             :       z.real = x;
   32827             :       z.imag = y;
   32828             :       return z;
   32829             :     }
   32830             : #endif
   32831             : 
   32832             : /* Arithmetic */
   32833             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32834             : #else
   32835             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32836             :        return (a.real == b.real) && (a.imag == b.imag);
   32837             :     }
   32838             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32839             :         __pyx_t_long_double_complex z;
   32840             :         z.real = a.real + b.real;
   32841             :         z.imag = a.imag + b.imag;
   32842             :         return z;
   32843             :     }
   32844             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32845             :         __pyx_t_long_double_complex z;
   32846             :         z.real = a.real - b.real;
   32847             :         z.imag = a.imag - b.imag;
   32848             :         return z;
   32849             :     }
   32850             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32851             :         __pyx_t_long_double_complex z;
   32852             :         z.real = a.real * b.real - a.imag * b.imag;
   32853             :         z.imag = a.real * b.imag + a.imag * b.real;
   32854             :         return z;
   32855             :     }
   32856             :     #if 1
   32857             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32858             :         if (b.imag == 0) {
   32859             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32860             :         } else if (fabsl(b.real) >= fabsl(b.imag)) {
   32861             :             if (b.real == 0 && b.imag == 0) {
   32862             :                 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32863             :             } else {
   32864             :                 long double r = b.imag / b.real;
   32865             :                 long double s = (long double)(1.0) / (b.real + b.imag * r);
   32866             :                 return __pyx_t_long_double_complex_from_parts(
   32867             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32868             :             }
   32869             :         } else {
   32870             :             long double r = b.real / b.imag;
   32871             :             long double s = (long double)(1.0) / (b.imag + b.real * r);
   32872             :             return __pyx_t_long_double_complex_from_parts(
   32873             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32874             :         }
   32875             :     }
   32876             :     #else
   32877             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32878             :         if (b.imag == 0) {
   32879             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32880             :         } else {
   32881             :             long double denom = b.real * b.real + b.imag * b.imag;
   32882             :             return __pyx_t_long_double_complex_from_parts(
   32883             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32884             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32885             :         }
   32886             :     }
   32887             :     #endif
   32888             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
   32889             :         __pyx_t_long_double_complex z;
   32890             :         z.real = -a.real;
   32891             :         z.imag = -a.imag;
   32892             :         return z;
   32893             :     }
   32894             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
   32895             :        return (a.real == 0) && (a.imag == 0);
   32896             :     }
   32897             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
   32898             :         __pyx_t_long_double_complex z;
   32899             :         z.real =  a.real;
   32900             :         z.imag = -a.imag;
   32901             :         return z;
   32902             :     }
   32903             :     #if 1
   32904             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
   32905             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32906             :             return sqrtl(z.real*z.real + z.imag*z.imag);
   32907             :           #else
   32908             :             return hypotl(z.real, z.imag);
   32909             :           #endif
   32910             :         }
   32911             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32912             :             __pyx_t_long_double_complex z;
   32913             :             long double r, lnr, theta, z_r, z_theta;
   32914             :             if (b.imag == 0 && b.real == (int)b.real) {
   32915             :                 if (b.real < 0) {
   32916             :                     long double denom = a.real * a.real + a.imag * a.imag;
   32917             :                     a.real = a.real / denom;
   32918             :                     a.imag = -a.imag / denom;
   32919             :                     b.real = -b.real;
   32920             :                 }
   32921             :                 switch ((int)b.real) {
   32922             :                     case 0:
   32923             :                         z.real = 1;
   32924             :                         z.imag = 0;
   32925             :                         return z;
   32926             :                     case 1:
   32927             :                         return a;
   32928             :                     case 2:
   32929             :                         return __Pyx_c_prod_long__double(a, a);
   32930             :                     case 3:
   32931             :                         z = __Pyx_c_prod_long__double(a, a);
   32932             :                         return __Pyx_c_prod_long__double(z, a);
   32933             :                     case 4:
   32934             :                         z = __Pyx_c_prod_long__double(a, a);
   32935             :                         return __Pyx_c_prod_long__double(z, z);
   32936             :                 }
   32937             :             }
   32938             :             if (a.imag == 0) {
   32939             :                 if (a.real == 0) {
   32940             :                     return a;
   32941             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32942             :                     z.real = powl(a.real, b.real);
   32943             :                     z.imag = 0;
   32944             :                     return z;
   32945             :                 } else if (a.real > 0) {
   32946             :                     r = a.real;
   32947             :                     theta = 0;
   32948             :                 } else {
   32949             :                     r = -a.real;
   32950             :                     theta = atan2l(0.0, -1.0);
   32951             :                 }
   32952             :             } else {
   32953             :                 r = __Pyx_c_abs_long__double(a);
   32954             :                 theta = atan2l(a.imag, a.real);
   32955             :             }
   32956             :             lnr = logl(r);
   32957             :             z_r = expl(lnr * b.real - theta * b.imag);
   32958             :             z_theta = theta * b.real + lnr * b.imag;
   32959             :             z.real = z_r * cosl(z_theta);
   32960             :             z.imag = z_r * sinl(z_theta);
   32961             :             return z;
   32962             :         }
   32963             :     #endif
   32964             : #endif
   32965             : 
   32966             : /* MemviewSliceCopyTemplate */
   32967             :   static __Pyx_memviewslice
   32968           0 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
   32969             :                                  const char *mode, int ndim,
   32970             :                                  size_t sizeof_dtype, int contig_flag,
   32971             :                                  int dtype_is_object)
   32972             : {
   32973             :     __Pyx_RefNannyDeclarations
   32974           0 :     int i;
   32975           0 :     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
   32976           0 :     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
   32977           0 :     Py_buffer *buf = &from_memview->view;
   32978           0 :     PyObject *shape_tuple = NULL;
   32979           0 :     PyObject *temp_int = NULL;
   32980           0 :     struct __pyx_array_obj *array_obj = NULL;
   32981           0 :     struct __pyx_memoryview_obj *memview_obj = NULL;
   32982           0 :     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
   32983           0 :     for (i = 0; i < ndim; i++) {
   32984           0 :         if (unlikely(from_mvs->suboffsets[i] >= 0)) {
   32985           0 :             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
   32986             :                                            "indirect dimensions (axis %d)", i);
   32987           0 :             goto fail;
   32988             :         }
   32989             :     }
   32990           0 :     shape_tuple = PyTuple_New(ndim);
   32991           0 :     if (unlikely(!shape_tuple)) {
   32992           0 :         goto fail;
   32993             :     }
   32994             :     __Pyx_GOTREF(shape_tuple);
   32995           0 :     for(i = 0; i < ndim; i++) {
   32996           0 :         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
   32997           0 :         if(unlikely(!temp_int)) {
   32998           0 :             goto fail;
   32999             :         } else {
   33000           0 :             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
   33001           0 :             temp_int = NULL;
   33002             :         }
   33003             :     }
   33004           0 :     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
   33005           0 :     if (unlikely(!array_obj)) {
   33006           0 :         goto fail;
   33007             :     }
   33008           0 :     __Pyx_GOTREF(array_obj);
   33009           0 :     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   33010             :                                     (PyObject *) array_obj, contig_flag,
   33011             :                                     dtype_is_object,
   33012           0 :                                     from_mvs->memview->typeinfo);
   33013           0 :     if (unlikely(!memview_obj))
   33014           0 :         goto fail;
   33015           0 :     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
   33016           0 :         goto fail;
   33017           0 :     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
   33018             :                                                 dtype_is_object) < 0))
   33019           0 :         goto fail;
   33020           0 :     goto no_fail;
   33021           0 : fail:
   33022           0 :     __Pyx_XDECREF(new_mvs.memview);
   33023           0 :     new_mvs.memview = NULL;
   33024           0 :     new_mvs.data = NULL;
   33025           0 : no_fail:
   33026           0 :     __Pyx_XDECREF(shape_tuple);
   33027           0 :     __Pyx_XDECREF(temp_int);
   33028           0 :     __Pyx_XDECREF(array_obj);
   33029           0 :     __Pyx_RefNannyFinishContext();
   33030           0 :     return new_mvs;
   33031             : }
   33032             : 
   33033             : /* MemviewSliceInit */
   33034             :   static int
   33035         772 : __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
   33036             :                         int ndim,
   33037             :                         __Pyx_memviewslice *memviewslice,
   33038             :                         int memview_is_new_reference)
   33039             : {
   33040             :     __Pyx_RefNannyDeclarations
   33041         772 :     int i, retval=-1;
   33042         772 :     Py_buffer *buf = &memview->view;
   33043         772 :     __Pyx_RefNannySetupContext("init_memviewslice", 0);
   33044         772 :     if (unlikely(memviewslice->memview || memviewslice->data)) {
   33045           0 :         PyErr_SetString(PyExc_ValueError,
   33046             :             "memviewslice is already initialized!");
   33047           0 :         goto fail;
   33048             :     }
   33049         772 :     if (buf->strides) {
   33050        1544 :         for (i = 0; i < ndim; i++) {
   33051         772 :             memviewslice->strides[i] = buf->strides[i];
   33052             :         }
   33053             :     } else {
   33054           0 :         Py_ssize_t stride = buf->itemsize;
   33055           0 :         for (i = ndim - 1; i >= 0; i--) {
   33056           0 :             memviewslice->strides[i] = stride;
   33057           0 :             stride *= buf->shape[i];
   33058             :         }
   33059             :     }
   33060        1544 :     for (i = 0; i < ndim; i++) {
   33061         772 :         memviewslice->shape[i]   = buf->shape[i];
   33062         772 :         if (buf->suboffsets) {
   33063           0 :             memviewslice->suboffsets[i] = buf->suboffsets[i];
   33064             :         } else {
   33065         772 :             memviewslice->suboffsets[i] = -1;
   33066             :         }
   33067             :     }
   33068         772 :     memviewslice->memview = memview;
   33069         772 :     memviewslice->data = (char *)buf->buf;
   33070         772 :     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
   33071           0 :         Py_INCREF(memview);
   33072             :     }
   33073         772 :     retval = 0;
   33074         772 :     goto no_fail;
   33075           0 : fail:
   33076           0 :     memviewslice->memview = 0;
   33077           0 :     memviewslice->data = 0;
   33078           0 :     retval = -1;
   33079         772 : no_fail:
   33080         772 :     __Pyx_RefNannyFinishContext();
   33081         772 :     return retval;
   33082             : }
   33083             : #ifndef Py_NO_RETURN
   33084             : #define Py_NO_RETURN
   33085             : #endif
   33086           0 : static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
   33087           0 :     va_list vargs;
   33088           0 :     char msg[200];
   33089             : #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
   33090           0 :     va_start(vargs, fmt);
   33091             : #else
   33092             :     va_start(vargs);
   33093             : #endif
   33094           0 :     vsnprintf(msg, 200, fmt, vargs);
   33095           0 :     va_end(vargs);
   33096           0 :     Py_FatalError(msg);
   33097             : }
   33098             : static CYTHON_INLINE int
   33099             : __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   33100             :                                    PyThread_type_lock lock)
   33101             : {
   33102             :     int result;
   33103             :     PyThread_acquire_lock(lock, 1);
   33104             :     result = (*acquisition_count)++;
   33105             :     PyThread_release_lock(lock);
   33106             :     return result;
   33107             : }
   33108             : static CYTHON_INLINE int
   33109             : __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   33110             :                                    PyThread_type_lock lock)
   33111             : {
   33112             :     int result;
   33113             :     PyThread_acquire_lock(lock, 1);
   33114             :     result = (*acquisition_count)--;
   33115             :     PyThread_release_lock(lock);
   33116             :     return result;
   33117             : }
   33118             : static CYTHON_INLINE void
   33119           0 : __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
   33120             : {
   33121           0 :     __pyx_nonatomic_int_type old_acquisition_count;
   33122           0 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   33123           0 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   33124             :         return;
   33125             :     }
   33126           0 :     old_acquisition_count = __pyx_add_acquisition_count(memview);
   33127           0 :     if (unlikely(old_acquisition_count <= 0)) {
   33128           0 :         if (likely(old_acquisition_count == 0)) {
   33129           0 :             if (have_gil) {
   33130           0 :                 Py_INCREF((PyObject *) memview);
   33131             :             } else {
   33132           0 :                 PyGILState_STATE _gilstate = PyGILState_Ensure();
   33133           0 :                 Py_INCREF((PyObject *) memview);
   33134           0 :                 PyGILState_Release(_gilstate);
   33135             :             }
   33136             :         } else {
   33137           0 :             __pyx_fatalerror("Acquisition count is %d (line %d)",
   33138             :                              old_acquisition_count+1, lineno);
   33139             :         }
   33140             :     }
   33141             : }
   33142         772 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
   33143             :                                              int have_gil, int lineno) {
   33144         772 :     __pyx_nonatomic_int_type old_acquisition_count;
   33145         772 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   33146         772 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   33147           0 :         memslice->memview = NULL;
   33148           0 :         return;
   33149             :     }
   33150         772 :     old_acquisition_count = __pyx_sub_acquisition_count(memview);
   33151         772 :     memslice->data = NULL;
   33152         772 :     if (likely(old_acquisition_count > 1)) {
   33153           0 :         memslice->memview = NULL;
   33154         772 :     } else if (likely(old_acquisition_count == 1)) {
   33155         772 :         if (have_gil) {
   33156         772 :             Py_CLEAR(memslice->memview);
   33157             :         } else {
   33158           0 :             PyGILState_STATE _gilstate = PyGILState_Ensure();
   33159           0 :             Py_CLEAR(memslice->memview);
   33160           0 :             PyGILState_Release(_gilstate);
   33161             :         }
   33162             :     } else {
   33163           0 :         __pyx_fatalerror("Acquisition count is %d (line %d)",
   33164             :                          old_acquisition_count-1, lineno);
   33165             :     }
   33166             : }
   33167             : 
   33168             : /* CIntToPy */
   33169        2192 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
   33170             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33171             : #pragma GCC diagnostic push
   33172             : #pragma GCC diagnostic ignored "-Wconversion"
   33173             : #endif
   33174        2192 :     const long neg_one = (long) -1, const_zero = (long) 0;
   33175             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33176             : #pragma GCC diagnostic pop
   33177             : #endif
   33178        2192 :     const int is_unsigned = neg_one > const_zero;
   33179        2192 :     if (is_unsigned) {
   33180             :         if (sizeof(long) < sizeof(long)) {
   33181             :             return PyInt_FromLong((long) value);
   33182             :         } else if (sizeof(long) <= sizeof(unsigned long)) {
   33183             :             return PyLong_FromUnsignedLong((unsigned long) value);
   33184             : #ifdef HAVE_LONG_LONG
   33185             :         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
   33186             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   33187             : #endif
   33188             :         }
   33189             :     } else {
   33190        2192 :         if (sizeof(long) <= sizeof(long)) {
   33191        2192 :             return PyInt_FromLong((long) value);
   33192             : #ifdef HAVE_LONG_LONG
   33193             :         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
   33194             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   33195             : #endif
   33196             :         }
   33197             :     }
   33198             :     {
   33199             :         unsigned char *bytes = (unsigned char *)&value;
   33200             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   33201             :         if (is_unsigned) {
   33202             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   33203             :         } else {
   33204             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   33205             :         }
   33206             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   33207             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33208             :         return _PyLong_FromByteArray(bytes, sizeof(long),
   33209             :                                      little, !is_unsigned);
   33210             : #else
   33211             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33212             :         PyObject *from_bytes, *result = NULL;
   33213             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   33214             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   33215             :         if (!from_bytes) return NULL;
   33216             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
   33217             :         if (!py_bytes) goto limited_bad;
   33218             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   33219             :         if (!order_str) goto limited_bad;
   33220             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   33221             :         if (!arg_tuple) goto limited_bad;
   33222             :         if (!is_unsigned) {
   33223             :             kwds = PyDict_New();
   33224             :             if (!kwds) goto limited_bad;
   33225             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   33226             :         }
   33227             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   33228             :         limited_bad:
   33229             :         Py_XDECREF(kwds);
   33230             :         Py_XDECREF(arg_tuple);
   33231             :         Py_XDECREF(order_str);
   33232             :         Py_XDECREF(py_bytes);
   33233             :         Py_XDECREF(from_bytes);
   33234             :         return result;
   33235             : #endif
   33236             :     }
   33237             : }
   33238             : 
   33239             : /* CIntFromPy */
   33240         584 :   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
   33241             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33242             : #pragma GCC diagnostic push
   33243             : #pragma GCC diagnostic ignored "-Wconversion"
   33244             : #endif
   33245         584 :     const long neg_one = (long) -1, const_zero = (long) 0;
   33246             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33247             : #pragma GCC diagnostic pop
   33248             : #endif
   33249         584 :     const int is_unsigned = neg_one > const_zero;
   33250             : #if PY_MAJOR_VERSION < 3
   33251             :     if (likely(PyInt_Check(x))) {
   33252             :         if ((sizeof(long) < sizeof(long))) {
   33253             :             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
   33254             :         } else {
   33255             :             long val = PyInt_AS_LONG(x);
   33256             :             if (is_unsigned && unlikely(val < 0)) {
   33257             :                 goto raise_neg_overflow;
   33258             :             }
   33259             :             return (long) val;
   33260             :         }
   33261             :     }
   33262             : #endif
   33263         584 :     if (unlikely(!PyLong_Check(x))) {
   33264           0 :         long val;
   33265           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33266           0 :         if (!tmp) return (long) -1;
   33267           0 :         val = __Pyx_PyInt_As_long(tmp);
   33268           0 :         Py_DECREF(tmp);
   33269           0 :         return val;
   33270             :     }
   33271         584 :     if (is_unsigned) {
   33272             : #if CYTHON_USE_PYLONG_INTERNALS
   33273             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33274             :             goto raise_neg_overflow;
   33275             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33276             :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33277             :         } else {
   33278             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33279             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33280             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33281             :                 case 2:
   33282             :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   33283             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33284             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33285             :                         } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
   33286             :                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33287             :                         }
   33288             :                     }
   33289             :                     break;
   33290             :                 case 3:
   33291             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   33292             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33293             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33294             :                         } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
   33295             :                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33296             :                         }
   33297             :                     }
   33298             :                     break;
   33299             :                 case 4:
   33300             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   33301             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33302             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33303             :                         } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
   33304             :                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33305             :                         }
   33306             :                     }
   33307             :                     break;
   33308             :             }
   33309             :         }
   33310             : #endif
   33311             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33312             :         if (unlikely(Py_SIZE(x) < 0)) {
   33313             :             goto raise_neg_overflow;
   33314             :         }
   33315             : #else
   33316             :         {
   33317             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33318             :             if (unlikely(result < 0))
   33319             :                 return (long) -1;
   33320             :             if (unlikely(result == 1))
   33321             :                 goto raise_neg_overflow;
   33322             :         }
   33323             : #endif
   33324             :         if ((sizeof(long) <= sizeof(unsigned long))) {
   33325             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
   33326             : #ifdef HAVE_LONG_LONG
   33327             :         } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
   33328             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33329             : #endif
   33330             :         }
   33331             :     } else {
   33332             : #if CYTHON_USE_PYLONG_INTERNALS
   33333         584 :         if (__Pyx_PyLong_IsCompact(x)) {
   33334         584 :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33335             :         } else {
   33336           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   33337           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33338           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33339             :                 case -2:
   33340           0 :                     if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
   33341           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33342           0 :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33343             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33344             :                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33345             :                         }
   33346             :                     }
   33347             :                     break;
   33348             :                 case 2:
   33349           0 :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   33350           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33351           0 :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33352             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33353             :                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33354             :                         }
   33355             :                     }
   33356             :                     break;
   33357             :                 case -3:
   33358             :                     if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33359             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33360             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33361             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33362             :                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33363             :                         }
   33364             :                     }
   33365             :                     break;
   33366             :                 case 3:
   33367             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   33368             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33369             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33370             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33371             :                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33372             :                         }
   33373             :                     }
   33374             :                     break;
   33375             :                 case -4:
   33376             :                     if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33377             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33378             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33379             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   33380             :                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33381             :                         }
   33382             :                     }
   33383             :                     break;
   33384             :                 case 4:
   33385             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   33386             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33387             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33388             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   33389             :                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33390             :                         }
   33391             :                     }
   33392             :                     break;
   33393             :             }
   33394             :         }
   33395             : #endif
   33396           0 :         if ((sizeof(long) <= sizeof(long))) {
   33397           0 :             __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
   33398             : #ifdef HAVE_LONG_LONG
   33399             :         } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
   33400             :             __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
   33401             : #endif
   33402             :         }
   33403             :     }
   33404             :     {
   33405             :         long val;
   33406             :         int ret = -1;
   33407             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   33408             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   33409             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   33410             :         if (unlikely(bytes_copied == -1)) {
   33411             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   33412             :             goto raise_overflow;
   33413             :         } else {
   33414             :             ret = 0;
   33415             :         }
   33416             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   33417             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   33418             :         unsigned char *bytes = (unsigned char *)&val;
   33419             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   33420             :                                     bytes, sizeof(val),
   33421             :                                     is_little, !is_unsigned);
   33422             : #else
   33423             :         PyObject *v;
   33424             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   33425             :         int bits, remaining_bits, is_negative = 0;
   33426             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   33427             :         if (likely(PyLong_CheckExact(x))) {
   33428             :             v = __Pyx_NewRef(x);
   33429             :         } else {
   33430             :             v = PyNumber_Long(x);
   33431             :             if (unlikely(!v)) return (long) -1;
   33432             :             assert(PyLong_CheckExact(v));
   33433             :         }
   33434             :         {
   33435             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   33436             :             if (unlikely(result < 0)) {
   33437             :                 Py_DECREF(v);
   33438             :                 return (long) -1;
   33439             :             }
   33440             :             is_negative = result == 1;
   33441             :         }
   33442             :         if (is_unsigned && unlikely(is_negative)) {
   33443             :             Py_DECREF(v);
   33444             :             goto raise_neg_overflow;
   33445             :         } else if (is_negative) {
   33446             :             stepval = PyNumber_Invert(v);
   33447             :             Py_DECREF(v);
   33448             :             if (unlikely(!stepval))
   33449             :                 return (long) -1;
   33450             :         } else {
   33451             :             stepval = v;
   33452             :         }
   33453             :         v = NULL;
   33454             :         val = (long) 0;
   33455             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   33456             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   33457             :         for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
   33458             :             PyObject *tmp, *digit;
   33459             :             long idigit;
   33460             :             digit = PyNumber_And(stepval, mask);
   33461             :             if (unlikely(!digit)) goto done;
   33462             :             idigit = PyLong_AsLong(digit);
   33463             :             Py_DECREF(digit);
   33464             :             if (unlikely(idigit < 0)) goto done;
   33465             :             val |= ((long) idigit) << bits;
   33466             :             tmp = PyNumber_Rshift(stepval, shift);
   33467             :             if (unlikely(!tmp)) goto done;
   33468             :             Py_DECREF(stepval); stepval = tmp;
   33469             :         }
   33470             :         Py_DECREF(shift); shift = NULL;
   33471             :         Py_DECREF(mask); mask = NULL;
   33472             :         {
   33473             :             long idigit = PyLong_AsLong(stepval);
   33474             :             if (unlikely(idigit < 0)) goto done;
   33475             :             remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
   33476             :             if (unlikely(idigit >= (1L << remaining_bits)))
   33477             :                 goto raise_overflow;
   33478             :             val |= ((long) idigit) << bits;
   33479             :         }
   33480             :         if (!is_unsigned) {
   33481             :             if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
   33482             :                 goto raise_overflow;
   33483             :             if (is_negative)
   33484             :                 val = ~val;
   33485             :         }
   33486             :         ret = 0;
   33487             :     done:
   33488             :         Py_XDECREF(shift);
   33489             :         Py_XDECREF(mask);
   33490             :         Py_XDECREF(stepval);
   33491             : #endif
   33492             :         if (unlikely(ret))
   33493             :             return (long) -1;
   33494             :         return val;
   33495             :     }
   33496             : raise_overflow:
   33497             :     PyErr_SetString(PyExc_OverflowError,
   33498             :         "value too large to convert to long");
   33499             :     return (long) -1;
   33500             : raise_neg_overflow:
   33501             :     PyErr_SetString(PyExc_OverflowError,
   33502             :         "can't convert negative value to long");
   33503             :     return (long) -1;
   33504             : }
   33505             : 
   33506             : /* CIntFromPy */
   33507         772 :   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
   33508             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33509             : #pragma GCC diagnostic push
   33510             : #pragma GCC diagnostic ignored "-Wconversion"
   33511             : #endif
   33512         772 :     const int neg_one = (int) -1, const_zero = (int) 0;
   33513             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33514             : #pragma GCC diagnostic pop
   33515             : #endif
   33516         772 :     const int is_unsigned = neg_one > const_zero;
   33517             : #if PY_MAJOR_VERSION < 3
   33518             :     if (likely(PyInt_Check(x))) {
   33519             :         if ((sizeof(int) < sizeof(long))) {
   33520             :             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
   33521             :         } else {
   33522             :             long val = PyInt_AS_LONG(x);
   33523             :             if (is_unsigned && unlikely(val < 0)) {
   33524             :                 goto raise_neg_overflow;
   33525             :             }
   33526             :             return (int) val;
   33527             :         }
   33528             :     }
   33529             : #endif
   33530         772 :     if (unlikely(!PyLong_Check(x))) {
   33531           0 :         int val;
   33532           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33533           0 :         if (!tmp) return (int) -1;
   33534           0 :         val = __Pyx_PyInt_As_int(tmp);
   33535           0 :         Py_DECREF(tmp);
   33536           0 :         return val;
   33537             :     }
   33538         772 :     if (is_unsigned) {
   33539             : #if CYTHON_USE_PYLONG_INTERNALS
   33540             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33541             :             goto raise_neg_overflow;
   33542             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33543             :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33544             :         } else {
   33545             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33546             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33547             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33548             :                 case 2:
   33549             :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   33550             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33551             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33552             :                         } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
   33553             :                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33554             :                         }
   33555             :                     }
   33556             :                     break;
   33557             :                 case 3:
   33558             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   33559             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33560             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33561             :                         } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
   33562             :                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33563             :                         }
   33564             :                     }
   33565             :                     break;
   33566             :                 case 4:
   33567             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   33568             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33569             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33570             :                         } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
   33571             :                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33572             :                         }
   33573             :                     }
   33574             :                     break;
   33575             :             }
   33576             :         }
   33577             : #endif
   33578             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33579             :         if (unlikely(Py_SIZE(x) < 0)) {
   33580             :             goto raise_neg_overflow;
   33581             :         }
   33582             : #else
   33583             :         {
   33584             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33585             :             if (unlikely(result < 0))
   33586             :                 return (int) -1;
   33587             :             if (unlikely(result == 1))
   33588             :                 goto raise_neg_overflow;
   33589             :         }
   33590             : #endif
   33591             :         if ((sizeof(int) <= sizeof(unsigned long))) {
   33592             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
   33593             : #ifdef HAVE_LONG_LONG
   33594             :         } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
   33595             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33596             : #endif
   33597             :         }
   33598             :     } else {
   33599             : #if CYTHON_USE_PYLONG_INTERNALS
   33600         772 :         if (__Pyx_PyLong_IsCompact(x)) {
   33601         772 :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33602             :         } else {
   33603           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   33604           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33605           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33606             :                 case -2:
   33607           0 :                     if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
   33608           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33609           0 :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33610             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33611             :                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33612             :                         }
   33613             :                     }
   33614             :                     break;
   33615             :                 case 2:
   33616           0 :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   33617           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33618           0 :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33619             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33620             :                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33621             :                         }
   33622             :                     }
   33623             :                     break;
   33624             :                 case -3:
   33625             :                     if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33626             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33627             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33628             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33629             :                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33630             :                         }
   33631             :                     }
   33632             :                     break;
   33633             :                 case 3:
   33634             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   33635             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33636             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33637             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33638             :                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33639             :                         }
   33640             :                     }
   33641             :                     break;
   33642             :                 case -4:
   33643             :                     if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33644             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33645             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33646             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   33647             :                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33648             :                         }
   33649             :                     }
   33650             :                     break;
   33651             :                 case 4:
   33652             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   33653             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33654             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33655             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   33656             :                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33657             :                         }
   33658             :                     }
   33659             :                     break;
   33660             :             }
   33661             :         }
   33662             : #endif
   33663           0 :         if ((sizeof(int) <= sizeof(long))) {
   33664           0 :             __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
   33665             : #ifdef HAVE_LONG_LONG
   33666             :         } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
   33667             :             __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
   33668             : #endif
   33669             :         }
   33670             :     }
   33671             :     {
   33672             :         int val;
   33673             :         int ret = -1;
   33674             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   33675             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   33676             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   33677             :         if (unlikely(bytes_copied == -1)) {
   33678             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   33679             :             goto raise_overflow;
   33680             :         } else {
   33681             :             ret = 0;
   33682             :         }
   33683             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   33684             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   33685             :         unsigned char *bytes = (unsigned char *)&val;
   33686             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   33687             :                                     bytes, sizeof(val),
   33688             :                                     is_little, !is_unsigned);
   33689             : #else
   33690             :         PyObject *v;
   33691             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   33692             :         int bits, remaining_bits, is_negative = 0;
   33693             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   33694             :         if (likely(PyLong_CheckExact(x))) {
   33695             :             v = __Pyx_NewRef(x);
   33696             :         } else {
   33697             :             v = PyNumber_Long(x);
   33698             :             if (unlikely(!v)) return (int) -1;
   33699             :             assert(PyLong_CheckExact(v));
   33700             :         }
   33701             :         {
   33702             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   33703             :             if (unlikely(result < 0)) {
   33704             :                 Py_DECREF(v);
   33705             :                 return (int) -1;
   33706             :             }
   33707             :             is_negative = result == 1;
   33708             :         }
   33709             :         if (is_unsigned && unlikely(is_negative)) {
   33710             :             Py_DECREF(v);
   33711             :             goto raise_neg_overflow;
   33712             :         } else if (is_negative) {
   33713             :             stepval = PyNumber_Invert(v);
   33714             :             Py_DECREF(v);
   33715             :             if (unlikely(!stepval))
   33716             :                 return (int) -1;
   33717             :         } else {
   33718             :             stepval = v;
   33719             :         }
   33720             :         v = NULL;
   33721             :         val = (int) 0;
   33722             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   33723             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   33724             :         for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
   33725             :             PyObject *tmp, *digit;
   33726             :             long idigit;
   33727             :             digit = PyNumber_And(stepval, mask);
   33728             :             if (unlikely(!digit)) goto done;
   33729             :             idigit = PyLong_AsLong(digit);
   33730             :             Py_DECREF(digit);
   33731             :             if (unlikely(idigit < 0)) goto done;
   33732             :             val |= ((int) idigit) << bits;
   33733             :             tmp = PyNumber_Rshift(stepval, shift);
   33734             :             if (unlikely(!tmp)) goto done;
   33735             :             Py_DECREF(stepval); stepval = tmp;
   33736             :         }
   33737             :         Py_DECREF(shift); shift = NULL;
   33738             :         Py_DECREF(mask); mask = NULL;
   33739             :         {
   33740             :             long idigit = PyLong_AsLong(stepval);
   33741             :             if (unlikely(idigit < 0)) goto done;
   33742             :             remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
   33743             :             if (unlikely(idigit >= (1L << remaining_bits)))
   33744             :                 goto raise_overflow;
   33745             :             val |= ((int) idigit) << bits;
   33746             :         }
   33747             :         if (!is_unsigned) {
   33748             :             if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
   33749             :                 goto raise_overflow;
   33750             :             if (is_negative)
   33751             :                 val = ~val;
   33752             :         }
   33753             :         ret = 0;
   33754             :     done:
   33755             :         Py_XDECREF(shift);
   33756             :         Py_XDECREF(mask);
   33757             :         Py_XDECREF(stepval);
   33758             : #endif
   33759             :         if (unlikely(ret))
   33760             :             return (int) -1;
   33761             :         return val;
   33762             :     }
   33763           0 : raise_overflow:
   33764           0 :     PyErr_SetString(PyExc_OverflowError,
   33765             :         "value too large to convert to int");
   33766           0 :     return (int) -1;
   33767             : raise_neg_overflow:
   33768             :     PyErr_SetString(PyExc_OverflowError,
   33769             :         "can't convert negative value to int");
   33770             :     return (int) -1;
   33771             : }
   33772             : 
   33773             : /* CIntToPy */
   33774         772 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
   33775             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33776             : #pragma GCC diagnostic push
   33777             : #pragma GCC diagnostic ignored "-Wconversion"
   33778             : #endif
   33779         772 :     const int neg_one = (int) -1, const_zero = (int) 0;
   33780             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33781             : #pragma GCC diagnostic pop
   33782             : #endif
   33783         772 :     const int is_unsigned = neg_one > const_zero;
   33784         772 :     if (is_unsigned) {
   33785             :         if (sizeof(int) < sizeof(long)) {
   33786             :             return PyInt_FromLong((long) value);
   33787             :         } else if (sizeof(int) <= sizeof(unsigned long)) {
   33788             :             return PyLong_FromUnsignedLong((unsigned long) value);
   33789             : #ifdef HAVE_LONG_LONG
   33790             :         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
   33791             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   33792             : #endif
   33793             :         }
   33794             :     } else {
   33795         772 :         if (sizeof(int) <= sizeof(long)) {
   33796         772 :             return PyInt_FromLong((long) value);
   33797             : #ifdef HAVE_LONG_LONG
   33798             :         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
   33799             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   33800             : #endif
   33801             :         }
   33802             :     }
   33803             :     {
   33804             :         unsigned char *bytes = (unsigned char *)&value;
   33805             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   33806             :         if (is_unsigned) {
   33807             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   33808             :         } else {
   33809             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   33810             :         }
   33811             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   33812             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33813             :         return _PyLong_FromByteArray(bytes, sizeof(int),
   33814             :                                      little, !is_unsigned);
   33815             : #else
   33816             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33817             :         PyObject *from_bytes, *result = NULL;
   33818             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   33819             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   33820             :         if (!from_bytes) return NULL;
   33821             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
   33822             :         if (!py_bytes) goto limited_bad;
   33823             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   33824             :         if (!order_str) goto limited_bad;
   33825             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   33826             :         if (!arg_tuple) goto limited_bad;
   33827             :         if (!is_unsigned) {
   33828             :             kwds = PyDict_New();
   33829             :             if (!kwds) goto limited_bad;
   33830             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   33831             :         }
   33832             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   33833             :         limited_bad:
   33834             :         Py_XDECREF(kwds);
   33835             :         Py_XDECREF(arg_tuple);
   33836             :         Py_XDECREF(order_str);
   33837             :         Py_XDECREF(py_bytes);
   33838             :         Py_XDECREF(from_bytes);
   33839             :         return result;
   33840             : #endif
   33841             :     }
   33842             : }
   33843             : 
   33844             : /* CIntFromPy */
   33845             :   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
   33846             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33847             : #pragma GCC diagnostic push
   33848             : #pragma GCC diagnostic ignored "-Wconversion"
   33849             : #endif
   33850             :     const char neg_one = (char) -1, const_zero = (char) 0;
   33851             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33852             : #pragma GCC diagnostic pop
   33853             : #endif
   33854             :     const int is_unsigned = neg_one > const_zero;
   33855             : #if PY_MAJOR_VERSION < 3
   33856             :     if (likely(PyInt_Check(x))) {
   33857             :         if ((sizeof(char) < sizeof(long))) {
   33858             :             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
   33859             :         } else {
   33860             :             long val = PyInt_AS_LONG(x);
   33861             :             if (is_unsigned && unlikely(val < 0)) {
   33862             :                 goto raise_neg_overflow;
   33863             :             }
   33864             :             return (char) val;
   33865             :         }
   33866             :     }
   33867             : #endif
   33868             :     if (unlikely(!PyLong_Check(x))) {
   33869             :         char val;
   33870             :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33871             :         if (!tmp) return (char) -1;
   33872             :         val = __Pyx_PyInt_As_char(tmp);
   33873             :         Py_DECREF(tmp);
   33874             :         return val;
   33875             :     }
   33876             :     if (is_unsigned) {
   33877             : #if CYTHON_USE_PYLONG_INTERNALS
   33878             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33879             :             goto raise_neg_overflow;
   33880             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33881             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33882             :         } else {
   33883             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33884             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33885             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33886             :                 case 2:
   33887             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   33888             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33889             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33890             :                         } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
   33891             :                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33892             :                         }
   33893             :                     }
   33894             :                     break;
   33895             :                 case 3:
   33896             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   33897             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33898             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33899             :                         } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
   33900             :                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33901             :                         }
   33902             :                     }
   33903             :                     break;
   33904             :                 case 4:
   33905             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   33906             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33907             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33908             :                         } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
   33909             :                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33910             :                         }
   33911             :                     }
   33912             :                     break;
   33913             :             }
   33914             :         }
   33915             : #endif
   33916             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33917             :         if (unlikely(Py_SIZE(x) < 0)) {
   33918             :             goto raise_neg_overflow;
   33919             :         }
   33920             : #else
   33921             :         {
   33922             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33923             :             if (unlikely(result < 0))
   33924             :                 return (char) -1;
   33925             :             if (unlikely(result == 1))
   33926             :                 goto raise_neg_overflow;
   33927             :         }
   33928             : #endif
   33929             :         if ((sizeof(char) <= sizeof(unsigned long))) {
   33930             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
   33931             : #ifdef HAVE_LONG_LONG
   33932             :         } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
   33933             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33934             : #endif
   33935             :         }
   33936             :     } else {
   33937             : #if CYTHON_USE_PYLONG_INTERNALS
   33938             :         if (__Pyx_PyLong_IsCompact(x)) {
   33939             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33940             :         } else {
   33941             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33942             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33943             :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33944             :                 case -2:
   33945             :                     if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
   33946             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33947             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33948             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33949             :                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33950             :                         }
   33951             :                     }
   33952             :                     break;
   33953             :                 case 2:
   33954             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   33955             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33956             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33957             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33958             :                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33959             :                         }
   33960             :                     }
   33961             :                     break;
   33962             :                 case -3:
   33963             :                     if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33964             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33965             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33966             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33967             :                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33968             :                         }
   33969             :                     }
   33970             :                     break;
   33971             :                 case 3:
   33972             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   33973             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33974             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33975             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33976             :                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33977             :                         }
   33978             :                     }
   33979             :                     break;
   33980             :                 case -4:
   33981             :                     if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33982             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33983             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33984             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   33985             :                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33986             :                         }
   33987             :                     }
   33988             :                     break;
   33989             :                 case 4:
   33990             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   33991             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33992             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33993             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   33994             :                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33995             :                         }
   33996             :                     }
   33997             :                     break;
   33998             :             }
   33999             :         }
   34000             : #endif
   34001             :         if ((sizeof(char) <= sizeof(long))) {
   34002             :             __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
   34003             : #ifdef HAVE_LONG_LONG
   34004             :         } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
   34005             :             __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
   34006             : #endif
   34007             :         }
   34008             :     }
   34009             :     {
   34010             :         char val;
   34011             :         int ret = -1;
   34012             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   34013             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   34014             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   34015             :         if (unlikely(bytes_copied == -1)) {
   34016             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   34017             :             goto raise_overflow;
   34018             :         } else {
   34019             :             ret = 0;
   34020             :         }
   34021             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   34022             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   34023             :         unsigned char *bytes = (unsigned char *)&val;
   34024             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   34025             :                                     bytes, sizeof(val),
   34026             :                                     is_little, !is_unsigned);
   34027             : #else
   34028             :         PyObject *v;
   34029             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   34030             :         int bits, remaining_bits, is_negative = 0;
   34031             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   34032             :         if (likely(PyLong_CheckExact(x))) {
   34033             :             v = __Pyx_NewRef(x);
   34034             :         } else {
   34035             :             v = PyNumber_Long(x);
   34036             :             if (unlikely(!v)) return (char) -1;
   34037             :             assert(PyLong_CheckExact(v));
   34038             :         }
   34039             :         {
   34040             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   34041             :             if (unlikely(result < 0)) {
   34042             :                 Py_DECREF(v);
   34043             :                 return (char) -1;
   34044             :             }
   34045             :             is_negative = result == 1;
   34046             :         }
   34047             :         if (is_unsigned && unlikely(is_negative)) {
   34048             :             Py_DECREF(v);
   34049             :             goto raise_neg_overflow;
   34050             :         } else if (is_negative) {
   34051             :             stepval = PyNumber_Invert(v);
   34052             :             Py_DECREF(v);
   34053             :             if (unlikely(!stepval))
   34054             :                 return (char) -1;
   34055             :         } else {
   34056             :             stepval = v;
   34057             :         }
   34058             :         v = NULL;
   34059             :         val = (char) 0;
   34060             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   34061             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   34062             :         for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
   34063             :             PyObject *tmp, *digit;
   34064             :             long idigit;
   34065             :             digit = PyNumber_And(stepval, mask);
   34066             :             if (unlikely(!digit)) goto done;
   34067             :             idigit = PyLong_AsLong(digit);
   34068             :             Py_DECREF(digit);
   34069             :             if (unlikely(idigit < 0)) goto done;
   34070             :             val |= ((char) idigit) << bits;
   34071             :             tmp = PyNumber_Rshift(stepval, shift);
   34072             :             if (unlikely(!tmp)) goto done;
   34073             :             Py_DECREF(stepval); stepval = tmp;
   34074             :         }
   34075             :         Py_DECREF(shift); shift = NULL;
   34076             :         Py_DECREF(mask); mask = NULL;
   34077             :         {
   34078             :             long idigit = PyLong_AsLong(stepval);
   34079             :             if (unlikely(idigit < 0)) goto done;
   34080             :             remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
   34081             :             if (unlikely(idigit >= (1L << remaining_bits)))
   34082             :                 goto raise_overflow;
   34083             :             val |= ((char) idigit) << bits;
   34084             :         }
   34085             :         if (!is_unsigned) {
   34086             :             if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
   34087             :                 goto raise_overflow;
   34088             :             if (is_negative)
   34089             :                 val = ~val;
   34090             :         }
   34091             :         ret = 0;
   34092             :     done:
   34093             :         Py_XDECREF(shift);
   34094             :         Py_XDECREF(mask);
   34095             :         Py_XDECREF(stepval);
   34096             : #endif
   34097             :         if (unlikely(ret))
   34098             :             return (char) -1;
   34099             :         return val;
   34100             :     }
   34101             : raise_overflow:
   34102             :     PyErr_SetString(PyExc_OverflowError,
   34103             :         "value too large to convert to char");
   34104             :     return (char) -1;
   34105             : raise_neg_overflow:
   34106             :     PyErr_SetString(PyExc_OverflowError,
   34107             :         "can't convert negative value to char");
   34108             :     return (char) -1;
   34109             : }
   34110             : 
   34111             : /* FormatTypeName */
   34112             :   #if CYTHON_COMPILING_IN_LIMITED_API
   34113             : static __Pyx_TypeName
   34114             : __Pyx_PyType_GetName(PyTypeObject* tp)
   34115             : {
   34116             :     PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
   34117             :                                                __pyx_n_s_name_2);
   34118             :     if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
   34119             :         PyErr_Clear();
   34120             :         Py_XDECREF(name);
   34121             :         name = __Pyx_NewRef(__pyx_n_s__30);
   34122             :     }
   34123             :     return name;
   34124             : }
   34125             : #endif
   34126             : 
   34127             : /* CheckBinaryVersion */
   34128           3 :   static unsigned long __Pyx_get_runtime_version(void) {
   34129             : #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
   34130           3 :     return Py_Version & ~0xFFUL;
   34131             : #else
   34132             :     const char* rt_version = Py_GetVersion();
   34133             :     unsigned long version = 0;
   34134             :     unsigned long factor = 0x01000000UL;
   34135             :     unsigned int digit = 0;
   34136             :     int i = 0;
   34137             :     while (factor) {
   34138             :         while ('0' <= rt_version[i] && rt_version[i] <= '9') {
   34139             :             digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
   34140             :             ++i;
   34141             :         }
   34142             :         version += factor * digit;
   34143             :         if (rt_version[i] != '.')
   34144             :             break;
   34145             :         digit = 0;
   34146             :         factor >>= 8;
   34147             :         ++i;
   34148             :     }
   34149             :     return version;
   34150             : #endif
   34151             : }
   34152           3 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
   34153           3 :     const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
   34154           3 :     if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
   34155             :         return 0;
   34156           0 :     if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
   34157             :         return 1;
   34158             :     {
   34159           0 :         char message[200];
   34160           0 :         PyOS_snprintf(message, sizeof(message),
   34161             :                       "compile time Python version %d.%d "
   34162             :                       "of module '%.100s' "
   34163             :                       "%s "
   34164             :                       "runtime version %d.%d",
   34165           0 :                        (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
   34166             :                        __Pyx_MODULE_NAME,
   34167             :                        (allow_newer) ? "was newer than" : "does not match",
   34168           0 :                        (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
   34169             :        );
   34170           0 :         return PyErr_WarnEx(NULL, message, 1);
   34171             :     }
   34172             : }
   34173             : 
   34174             : /* InitStrings */
   34175             :   #if PY_MAJOR_VERSION >= 3
   34176         627 : static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
   34177         627 :     if (t.is_unicode | t.is_str) {
   34178         621 :         if (t.intern) {
   34179         489 :             *str = PyUnicode_InternFromString(t.s);
   34180         132 :         } else if (t.encoding) {
   34181           0 :             *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
   34182             :         } else {
   34183         132 :             *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
   34184             :         }
   34185             :     } else {
   34186           6 :         *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
   34187             :     }
   34188         627 :     if (!*str)
   34189             :         return -1;
   34190         627 :     if (PyObject_Hash(*str) == -1)
   34191             :         return -1;
   34192             :     return 0;
   34193             : }
   34194             : #endif
   34195           3 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
   34196         630 :     while (t->p) {
   34197             :         #if PY_MAJOR_VERSION >= 3
   34198         627 :         __Pyx_InitString(*t, t->p);
   34199             :         #else
   34200             :         if (t->is_unicode) {
   34201             :             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
   34202             :         } else if (t->intern) {
   34203             :             *t->p = PyString_InternFromString(t->s);
   34204             :         } else {
   34205             :             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
   34206             :         }
   34207             :         if (!*t->p)
   34208             :             return -1;
   34209             :         if (PyObject_Hash(*t->p) == -1)
   34210             :             return -1;
   34211             :         #endif
   34212         627 :         ++t;
   34213             :     }
   34214           3 :     return 0;
   34215             : }
   34216             : 
   34217             : #include <string.h>
   34218           0 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
   34219           0 :     size_t len = strlen(s);
   34220           0 :     if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
   34221             :         PyErr_SetString(PyExc_OverflowError, "byte string is too long");
   34222             :         return -1;
   34223             :     }
   34224             :     return (Py_ssize_t) len;
   34225             : }
   34226             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
   34227             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   34228             :     if (unlikely(len < 0)) return NULL;
   34229             :     return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
   34230             : }
   34231             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
   34232             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   34233             :     if (unlikely(len < 0)) return NULL;
   34234             :     return PyByteArray_FromStringAndSize(c_str, len);
   34235             : }
   34236             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
   34237             :     Py_ssize_t ignore;
   34238             :     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
   34239             : }
   34240             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   34241             : #if !CYTHON_PEP393_ENABLED
   34242             : static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34243             :     char* defenc_c;
   34244             :     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
   34245             :     if (!defenc) return NULL;
   34246             :     defenc_c = PyBytes_AS_STRING(defenc);
   34247             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34248             :     {
   34249             :         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
   34250             :         char* c;
   34251             :         for (c = defenc_c; c < end; c++) {
   34252             :             if ((unsigned char) (*c) >= 128) {
   34253             :                 PyUnicode_AsASCIIString(o);
   34254             :                 return NULL;
   34255             :             }
   34256             :         }
   34257             :     }
   34258             : #endif
   34259             :     *length = PyBytes_GET_SIZE(defenc);
   34260             :     return defenc_c;
   34261             : }
   34262             : #else
   34263             : static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34264             :     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
   34265             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34266             :     if (likely(PyUnicode_IS_ASCII(o))) {
   34267             :         *length = PyUnicode_GET_LENGTH(o);
   34268             :         return PyUnicode_AsUTF8(o);
   34269             :     } else {
   34270             :         PyUnicode_AsASCIIString(o);
   34271             :         return NULL;
   34272             :     }
   34273             : #else
   34274             :     return PyUnicode_AsUTF8AndSize(o, length);
   34275             : #endif
   34276             : }
   34277             : #endif
   34278             : #endif
   34279             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34280             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   34281             :     if (
   34282             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34283             :             __Pyx_sys_getdefaultencoding_not_ascii &&
   34284             : #endif
   34285             :             PyUnicode_Check(o)) {
   34286             :         return __Pyx_PyUnicode_AsStringAndSize(o, length);
   34287             :     } else
   34288             : #endif
   34289             : #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
   34290             :     if (PyByteArray_Check(o)) {
   34291             :         *length = PyByteArray_GET_SIZE(o);
   34292             :         return PyByteArray_AS_STRING(o);
   34293             :     } else
   34294             : #endif
   34295             :     {
   34296             :         char* result;
   34297             :         int r = PyBytes_AsStringAndSize(o, &result, length);
   34298             :         if (unlikely(r < 0)) {
   34299             :             return NULL;
   34300             :         } else {
   34301             :             return result;
   34302             :         }
   34303             :     }
   34304             : }
   34305        2107 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   34306        2107 :    int is_true = x == Py_True;
   34307        2107 :    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   34308           7 :    else return PyObject_IsTrue(x);
   34309             : }
   34310             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
   34311             :     int retval;
   34312             :     if (unlikely(!x)) return -1;
   34313             :     retval = __Pyx_PyObject_IsTrue(x);
   34314             :     Py_DECREF(x);
   34315             :     return retval;
   34316             : }
   34317           0 : static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
   34318           0 :     __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
   34319             : #if PY_MAJOR_VERSION >= 3
   34320           0 :     if (PyLong_Check(result)) {
   34321           0 :         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
   34322             :                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
   34323             :                 "The ability to return an instance of a strict subclass of int is deprecated, "
   34324             :                 "and may be removed in a future version of Python.",
   34325             :                 result_type_name)) {
   34326           0 :             __Pyx_DECREF_TypeName(result_type_name);
   34327           0 :             Py_DECREF(result);
   34328           0 :             return NULL;
   34329             :         }
   34330             :         __Pyx_DECREF_TypeName(result_type_name);
   34331             :         return result;
   34332             :     }
   34333             : #endif
   34334           0 :     PyErr_Format(PyExc_TypeError,
   34335             :                  "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
   34336             :                  type_name, type_name, result_type_name);
   34337           0 :     __Pyx_DECREF_TypeName(result_type_name);
   34338           0 :     Py_DECREF(result);
   34339             :     return NULL;
   34340             : }
   34341           0 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
   34342             : #if CYTHON_USE_TYPE_SLOTS
   34343           0 :   PyNumberMethods *m;
   34344             : #endif
   34345           0 :   const char *name = NULL;
   34346           0 :   PyObject *res = NULL;
   34347             : #if PY_MAJOR_VERSION < 3
   34348             :   if (likely(PyInt_Check(x) || PyLong_Check(x)))
   34349             : #else
   34350           0 :   if (likely(PyLong_Check(x)))
   34351             : #endif
   34352           0 :     return __Pyx_NewRef(x);
   34353             : #if CYTHON_USE_TYPE_SLOTS
   34354           0 :   m = Py_TYPE(x)->tp_as_number;
   34355             :   #if PY_MAJOR_VERSION < 3
   34356             :   if (m && m->nb_int) {
   34357             :     name = "int";
   34358             :     res = m->nb_int(x);
   34359             :   }
   34360             :   else if (m && m->nb_long) {
   34361             :     name = "long";
   34362             :     res = m->nb_long(x);
   34363             :   }
   34364             :   #else
   34365           0 :   if (likely(m && m->nb_int)) {
   34366           0 :     name = "int";
   34367           0 :     res = m->nb_int(x);
   34368             :   }
   34369             :   #endif
   34370             : #else
   34371             :   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
   34372             :     res = PyNumber_Int(x);
   34373             :   }
   34374             : #endif
   34375           0 :   if (likely(res)) {
   34376             : #if PY_MAJOR_VERSION < 3
   34377             :     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
   34378             : #else
   34379           0 :     if (unlikely(!PyLong_CheckExact(res))) {
   34380             : #endif
   34381           0 :         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
   34382             :     }
   34383             :   }
   34384           0 :   else if (!PyErr_Occurred()) {
   34385           0 :     PyErr_SetString(PyExc_TypeError,
   34386             :                     "an integer is required");
   34387             :   }
   34388             :   return res;
   34389             : }
   34390           0 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   34391           0 :   Py_ssize_t ival;
   34392           0 :   PyObject *x;
   34393             : #if PY_MAJOR_VERSION < 3
   34394             :   if (likely(PyInt_CheckExact(b))) {
   34395             :     if (sizeof(Py_ssize_t) >= sizeof(long))
   34396             :         return PyInt_AS_LONG(b);
   34397             :     else
   34398             :         return PyInt_AsSsize_t(b);
   34399             :   }
   34400             : #endif
   34401           0 :   if (likely(PyLong_CheckExact(b))) {
   34402             :     #if CYTHON_USE_PYLONG_INTERNALS
   34403           0 :     if (likely(__Pyx_PyLong_IsCompact(b))) {
   34404           0 :         return __Pyx_PyLong_CompactValue(b);
   34405             :     } else {
   34406           0 :       const digit* digits = __Pyx_PyLong_Digits(b);
   34407           0 :       const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
   34408           0 :       switch (size) {
   34409             :          case 2:
   34410           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   34411           0 :              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34412             :            }
   34413             :            break;
   34414             :          case -2:
   34415           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   34416           0 :              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34417             :            }
   34418             :            break;
   34419             :          case 3:
   34420             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   34421             :              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34422             :            }
   34423             :            break;
   34424             :          case -3:
   34425             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   34426             :              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34427             :            }
   34428             :            break;
   34429             :          case 4:
   34430             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   34431             :              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34432             :            }
   34433             :            break;
   34434             :          case -4:
   34435             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   34436             :              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34437             :            }
   34438             :            break;
   34439             :       }
   34440             :     }
   34441             :     #endif
   34442           0 :     return PyLong_AsSsize_t(b);
   34443             :   }
   34444           0 :   x = PyNumber_Index(b);
   34445           0 :   if (!x) return -1;
   34446           0 :   ival = PyInt_AsSsize_t(x);
   34447           0 :   Py_DECREF(x);
   34448             :   return ival;
   34449             : }
   34450             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
   34451             :   if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
   34452             :     return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
   34453             : #if PY_MAJOR_VERSION < 3
   34454             :   } else if (likely(PyInt_CheckExact(o))) {
   34455             :     return PyInt_AS_LONG(o);
   34456             : #endif
   34457             :   } else {
   34458             :     Py_ssize_t ival;
   34459             :     PyObject *x;
   34460             :     x = PyNumber_Index(o);
   34461             :     if (!x) return -1;
   34462             :     ival = PyInt_AsLong(x);
   34463             :     Py_DECREF(x);
   34464             :     return ival;
   34465             :   }
   34466             : }
   34467         772 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
   34468         772 :   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
   34469             : }
   34470             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
   34471             :     return PyInt_FromSize_t(ival);
   34472             : }
   34473             : 
   34474             : 
   34475             : /* #### Code section: utility_code_pragmas_end ### */
   34476             : #ifdef _MSC_VER
   34477             : #pragma warning( pop )
   34478             : #endif
   34479             : 
   34480             : 
   34481             : 
   34482             : /* #### Code section: end ### */
   34483             : #endif /* Py_PYTHON_H */

Generated by: LCOV version 1.14